Added no issues message
This commit is contained in:
parent
e660655864
commit
2a4b4c4453
4 changed files with 26 additions and 16 deletions
|
|
@ -7,10 +7,10 @@ import {
|
||||||
checkNavigatorProperties,
|
checkNavigatorProperties,
|
||||||
checkWebWorker,
|
checkWebWorker,
|
||||||
checkScreenProperties,
|
checkScreenProperties,
|
||||||
getBrowser,
|
getUserAgentData,
|
||||||
} from './main';
|
} from './main';
|
||||||
|
|
||||||
const PredictionBlock = () => {
|
const OtherBlock = () => {
|
||||||
const [firstRender, setfirstRender] = useState(true);
|
const [firstRender, setfirstRender] = useState(true);
|
||||||
const [workerData, setWorkerData] = useState('');
|
const [workerData, setWorkerData] = useState('');
|
||||||
const [userAgent, setUserAgent] = useState();
|
const [userAgent, setUserAgent] = useState();
|
||||||
|
|
@ -29,12 +29,13 @@ const PredictionBlock = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScanBlock>
|
<ScanBlock>
|
||||||
<h1>Data</h1>
|
<h1>Other</h1>
|
||||||
{userAgent && (
|
{userAgent && (
|
||||||
<div className="boxWrap">
|
<div className="boxWrap">
|
||||||
<div className="newline">
|
{/* <Table type="screen" data={getUserAgentData()} /> */}
|
||||||
|
{/* <div className="newline">
|
||||||
{getBrowser(userAgent.browser.name)} {userAgent.browser.version}
|
{getBrowser(userAgent.browser.name)} {userAgent.browser.version}
|
||||||
</div>
|
</div> */}
|
||||||
<div className="newline">
|
<div className="newline">
|
||||||
{userAgent.os.name} {userAgent.os.versionName}
|
{userAgent.os.name} {userAgent.os.versionName}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -48,4 +49,4 @@ const PredictionBlock = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PredictionBlock;
|
export default OtherBlock;
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
import PredictionBlock from './PredictionBlock';
|
import OtherBlock from './OtherBlock';
|
||||||
import NavigatorBlock from './NavigatorBlock';
|
import NavigatorBlock from './NavigatorBlock';
|
||||||
import ScreenBlock from './ScreenBlock';
|
import ScreenBlock from './ScreenBlock';
|
||||||
import FingerprintBlock from './FingerprintBlock';
|
import FingerprintBlock from './FingerprintBlock';
|
||||||
|
|
@ -12,7 +12,7 @@ import FiltersBlock from './FiltersBlock';
|
||||||
|
|
||||||
const ScanBlocks = () => (
|
const ScanBlocks = () => (
|
||||||
<>
|
<>
|
||||||
<PredictionBlock />
|
<OtherBlock />
|
||||||
<ScreenBlock />
|
<ScreenBlock />
|
||||||
<NavigatorBlock />
|
<NavigatorBlock />
|
||||||
{/* <LocationBlock />
|
{/* <LocationBlock />
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,20 @@ const TableRow = ({ item }) => {
|
||||||
<td>{item.title}</td>
|
<td>{item.title}</td>
|
||||||
<td>{item.value}</td>
|
<td>{item.value}</td>
|
||||||
<td>
|
<td>
|
||||||
{item.issues.map((ele, index) => (
|
{issues ? (
|
||||||
<div className="newline" key={index}>
|
<>
|
||||||
{ele}
|
{item.issues.map((ele, index) => (
|
||||||
</div>
|
<div className="newline" key={index}>
|
||||||
))}
|
{ele}
|
||||||
<div className="newline">
|
</div>
|
||||||
{workerData && <>{`Did not match web worker (${workerData})`}</>}
|
))}
|
||||||
</div>
|
<div className="newline">
|
||||||
|
{workerData && <>{`Did not match web worker (${workerData})`}</>}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
'No issues'
|
||||||
|
)}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ export {
|
||||||
getScreen,
|
getScreen,
|
||||||
checkScreenProperties,
|
checkScreenProperties,
|
||||||
getBrowser,
|
getBrowser,
|
||||||
|
getUserAgentData,
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDeviceMemory = () => ({
|
const getDeviceMemory = () => ({
|
||||||
|
|
@ -278,6 +279,8 @@ const getScreen = () => [
|
||||||
getColorDepth(),
|
getColorDepth(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const getUserAgentData = () => [getBrowser()];
|
||||||
|
|
||||||
// sorts plugins object into comma separated list
|
// sorts plugins object into comma separated list
|
||||||
const sortPlugins = (data) => {
|
const sortPlugins = (data) => {
|
||||||
const { length } = data;
|
const { length } = data;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue