Added signature form

This commit is contained in:
z0ccc 2021-09-28 16:27:34 -04:00
parent 7146159208
commit e4c7448b0b

View file

@ -5,8 +5,9 @@ import Table from './Table';
import getHash from '../utils/fingerprint';
const FingerprintBlock = ({ workerData }) => {
const [signature, setSignature] = useState();
const hash = getHash(workerData);
console.log(hash);
return (
<Block>
<h1>Fingerprint</h1>
@ -19,6 +20,19 @@ const FingerprintBlock = ({ workerData }) => {
use private mode the hash will stay the same. Enter your name below and
reload the page in private mode to test it out.
</p>
{signature ? (
<p>Success! Reload browser.</p>
) : (
<form onSubmit={(e) => setSignature(e.target[0].value)}>
<input
type="text"
id="name"
name="name"
placeholder="Enter signature"
/>
<input type="submit" id="saveButton" value="Save" maxLength="100" />
</form>
)}
</Block>
);
};