diff --git a/frontend/src/components/ConnectBlock.js b/frontend/src/components/ConnectBlock.js index 4e532e1..4ddde14 100644 --- a/frontend/src/components/ConnectBlock.js +++ b/frontend/src/components/ConnectBlock.js @@ -65,7 +65,7 @@ const ConnectBlock = () => { {display === 1 && } {display === 0 && (
- Unable to load data. Adblock or content filter may have blocked data from loading. + Unable to fetch info. Adblock or content filter may have prevented data from loading.
)}

diff --git a/frontend/src/components/LocationBlock.js b/frontend/src/components/LocationBlock.js index cc06c35..6647467 100644 --- a/frontend/src/components/LocationBlock.js +++ b/frontend/src/components/LocationBlock.js @@ -4,14 +4,17 @@ import Table from './Table'; const LocationBlock = () => { const [locationData, setLocationData] = useState(''); - const [display, setDisplay] = useState('none'); + const [display, setDisplay] = useState(''); useEffect(() => { fetch('http://ip-api.com/json') .then((response) => response.json()) .then((data) => { setLocationData(data); - setDisplay('block'); + setDisplay(1); + }) + .catch(() => { + setDisplay(0); }); }, []); @@ -53,10 +56,18 @@ const LocationBlock = () => { return (

Location

-
- Map of current location -
- + {display === 1 && ( + <> + Map of current location +
+ + )} + {display === 0 && ( +
+ Unable to fetch info. Adblock or content filter may have prevented + data from loading. +
+ )}

Explanation: Your IP address can be used to determine your location. Using a VPN or Tor will hide your true location. diff --git a/frontend/src/components/ScanBlocks.js b/frontend/src/components/ScanBlocks.js index 0c2d68b..a6f5fa7 100644 --- a/frontend/src/components/ScanBlocks.js +++ b/frontend/src/components/ScanBlocks.js @@ -7,15 +7,15 @@ import FiltersBlock from './FiltersBlock'; // import FontsBlock from './FontsBlock'; const ScanBlocks = () => ( -

- + <> - + + {/* */} -
+ ); export default ScanBlocks;