Removed useState and useEffect from software component
This commit is contained in:
parent
1a5166c272
commit
4353d95b56
1 changed files with 10 additions and 19 deletions
|
|
@ -1,25 +1,16 @@
|
|||
import { useState, useEffect } from 'react';
|
||||
import ScanBlock from './ScanBlock';
|
||||
import Table from './Table';
|
||||
import { getSoftware } from './main';
|
||||
|
||||
const HardwareBlock = () => {
|
||||
const [data, setData] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
setData(getSoftware());
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ScanBlock>
|
||||
<h1>Software</h1>
|
||||
<Table data={data} />
|
||||
<p>
|
||||
<b>Explanation:</b> JavaScript can be used to find information about
|
||||
your software. This information can be used to create a fingerprint.
|
||||
</p>
|
||||
</ScanBlock>
|
||||
);
|
||||
};
|
||||
const HardwareBlock = () => (
|
||||
<ScanBlock>
|
||||
<h1>Software</h1>
|
||||
<Table data={getSoftware()} />
|
||||
<p>
|
||||
<b>Explanation:</b> JavaScript can be used to find information about your
|
||||
software. This information can be used to create a fingerprint.
|
||||
</p>
|
||||
</ScanBlock>
|
||||
);
|
||||
|
||||
export default HardwareBlock;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue