diff --git a/frontend/src/components/PredictionBlock.js b/frontend/src/components/OtherBlock.js similarity index 84% rename from frontend/src/components/PredictionBlock.js rename to frontend/src/components/OtherBlock.js index 1b3793e..b28a1c5 100644 --- a/frontend/src/components/PredictionBlock.js +++ b/frontend/src/components/OtherBlock.js @@ -7,10 +7,10 @@ import { checkNavigatorProperties, checkWebWorker, checkScreenProperties, - getBrowser, + getUserAgentData, } from './main'; -const PredictionBlock = () => { +const OtherBlock = () => { const [firstRender, setfirstRender] = useState(true); const [workerData, setWorkerData] = useState(''); const [userAgent, setUserAgent] = useState(); @@ -29,12 +29,13 @@ const PredictionBlock = () => { return ( -

Data

+

Other

{userAgent && (
-
+ {/* */} + {/*
{getBrowser(userAgent.browser.name)} {userAgent.browser.version} -
+ */}
{userAgent.os.name} {userAgent.os.versionName}
@@ -48,4 +49,4 @@ const PredictionBlock = () => { ); }; -export default PredictionBlock; +export default OtherBlock; diff --git a/frontend/src/components/ScanBlocks.js b/frontend/src/components/ScanBlocks.js index 62f2f27..b8aa7d2 100644 --- a/frontend/src/components/ScanBlocks.js +++ b/frontend/src/components/ScanBlocks.js @@ -1,5 +1,5 @@ /* eslint-disable no-unused-vars */ -import PredictionBlock from './PredictionBlock'; +import OtherBlock from './OtherBlock'; import NavigatorBlock from './NavigatorBlock'; import ScreenBlock from './ScreenBlock'; import FingerprintBlock from './FingerprintBlock'; @@ -12,7 +12,7 @@ import FiltersBlock from './FiltersBlock'; const ScanBlocks = () => ( <> - + {/* diff --git a/frontend/src/components/TableRow.js b/frontend/src/components/TableRow.js index 4010de2..2c90ec7 100644 --- a/frontend/src/components/TableRow.js +++ b/frontend/src/components/TableRow.js @@ -29,14 +29,20 @@ const TableRow = ({ item }) => { ); diff --git a/frontend/src/components/main.js b/frontend/src/components/main.js index 330520f..125affc 100644 --- a/frontend/src/components/main.js +++ b/frontend/src/components/main.js @@ -9,6 +9,7 @@ export { getScreen, checkScreenProperties, getBrowser, + getUserAgentData, }; const getDeviceMemory = () => ({ @@ -278,6 +279,8 @@ const getScreen = () => [ getColorDepth(), ]; +const getUserAgentData = () => [getBrowser()]; + // sorts plugins object into comma separated list const sortPlugins = (data) => { const { length } = data;
{item.title} {item.value} - {item.issues.map((ele, index) => ( -
- {ele} -
- ))} -
- {workerData && <>{`Did not match web worker (${workerData})`}} -
+ {issues ? ( + <> + {item.issues.map((ele, index) => ( +
+ {ele} +
+ ))} +
+ {workerData && <>{`Did not match web worker (${workerData})`}} +
+ + ) : ( + 'No issues' + )}