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,
|
||||
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 (
|
||||
<ScanBlock>
|
||||
<h1>Data</h1>
|
||||
<h1>Other</h1>
|
||||
{userAgent && (
|
||||
<div className="boxWrap">
|
||||
<div className="newline">
|
||||
{/* <Table type="screen" data={getUserAgentData()} /> */}
|
||||
{/* <div className="newline">
|
||||
{getBrowser(userAgent.browser.name)} {userAgent.browser.version}
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="newline">
|
||||
{userAgent.os.name} {userAgent.os.versionName}
|
||||
</div>
|
||||
|
|
@ -48,4 +49,4 @@ const PredictionBlock = () => {
|
|||
);
|
||||
};
|
||||
|
||||
export default PredictionBlock;
|
||||
export default OtherBlock;
|
||||
|
|
@ -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 = () => (
|
||||
<>
|
||||
<PredictionBlock />
|
||||
<OtherBlock />
|
||||
<ScreenBlock />
|
||||
<NavigatorBlock />
|
||||
{/* <LocationBlock />
|
||||
|
|
|
|||
|
|
@ -29,14 +29,20 @@ const TableRow = ({ item }) => {
|
|||
<td>{item.title}</td>
|
||||
<td>{item.value}</td>
|
||||
<td>
|
||||
{item.issues.map((ele, index) => (
|
||||
<div className="newline" key={index}>
|
||||
{ele}
|
||||
</div>
|
||||
))}
|
||||
<div className="newline">
|
||||
{workerData && <>{`Did not match web worker (${workerData})`}</>}
|
||||
</div>
|
||||
{issues ? (
|
||||
<>
|
||||
{item.issues.map((ele, index) => (
|
||||
<div className="newline" key={index}>
|
||||
{ele}
|
||||
</div>
|
||||
))}
|
||||
<div className="newline">
|
||||
{workerData && <>{`Did not match web worker (${workerData})`}</>}
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
'No issues'
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue