added adblock error for connection
This commit is contained in:
parent
d62d8f59a6
commit
83d864df32
2 changed files with 16 additions and 10 deletions
|
|
@ -4,14 +4,17 @@ import Table from './Table';
|
||||||
|
|
||||||
const ConnectBlock = () => {
|
const ConnectBlock = () => {
|
||||||
const [connectData, setConnectData] = useState('');
|
const [connectData, setConnectData] = useState('');
|
||||||
const [display, setDisplay] = useState('none');
|
const [display, setDisplay] = useState('');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch('http://ip-api.com/json')
|
fetch('http://ip-api.com/json')
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
setConnectData(data);
|
setConnectData(data);
|
||||||
setDisplay('block');
|
setDisplay(1);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setDisplay(0);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
@ -32,22 +35,22 @@ const ConnectBlock = () => {
|
||||||
{
|
{
|
||||||
key: 'ipAddress',
|
key: 'ipAddress',
|
||||||
title: 'IP address',
|
title: 'IP address',
|
||||||
value: connectData.query || 'N/A',
|
value: connectData.query,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'isp',
|
key: 'isp',
|
||||||
title: 'ISP',
|
title: 'ISP',
|
||||||
value: connectData.isp || 'N/A',
|
value: connectData.isp,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'org',
|
key: 'org',
|
||||||
title: 'Organization',
|
title: 'Organization',
|
||||||
value: connectData.org || 'N/A',
|
value: connectData.org,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'asn',
|
key: 'asn',
|
||||||
title: 'ASN',
|
title: 'ASN',
|
||||||
value: connectData.as || 'N/A',
|
value: connectData.as,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'tor',
|
key: 'tor',
|
||||||
|
|
@ -59,9 +62,12 @@ const ConnectBlock = () => {
|
||||||
return (
|
return (
|
||||||
<ScanBlock>
|
<ScanBlock>
|
||||||
<h1>Connection</h1>
|
<h1>Connection</h1>
|
||||||
<div style={{ display }}>
|
{display === 1 && <Table data={data} />}
|
||||||
<Table data={data} />
|
{display === 0 && (
|
||||||
</div>
|
<div className="boxWrap">
|
||||||
|
Unable to load data. Adblock or content filter may have blocked data from loading.
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<p>
|
<p>
|
||||||
<b>Explanation:</b> Your IP address reveals information about your
|
<b>Explanation:</b> Your IP address reveals information about your
|
||||||
connection. Using a VPN or Tor will hide your connection info.
|
connection. Using a VPN or Tor will hide your connection info.
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ import FiltersBlock from './FiltersBlock';
|
||||||
|
|
||||||
const ScanBlocks = () => (
|
const ScanBlocks = () => (
|
||||||
<div>
|
<div>
|
||||||
|
<ConnectBlock />
|
||||||
<FingerprintBlock />
|
<FingerprintBlock />
|
||||||
<FiltersBlock />
|
<FiltersBlock />
|
||||||
<LocationBlock />
|
<LocationBlock />
|
||||||
<ConnectBlock />
|
|
||||||
<SoftwareBlock />
|
<SoftwareBlock />
|
||||||
<HardwareBlock />
|
<HardwareBlock />
|
||||||
{/* <FontsBlock /> */}
|
{/* <FontsBlock /> */}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue