mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
use uuid for userId
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
import { OpenPassportQRcode } from "../../../../src/QRcode/OpenPassportQRcode";
|
||||
import { TextField } from "@mui/material";
|
||||
import { useState } from "react";
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
export default function Home() {
|
||||
const [appName, setAppName] = useState("🌐 OpenPassport");
|
||||
const userId = uuidv4();
|
||||
return (
|
||||
<div className="h-screen w-full bg-white flex flex-col items-center justify-center gap-12">
|
||||
<OpenPassportQRcode requirements={[["older_than", "18"], ["nationality", "France"]]} appName={appName} scope="test" userId="test" onSuccess={() => { }} />
|
||||
<OpenPassportQRcode requirements={[["nationality", "France"], ["older_than", "18"]]} appName={appName} scope="test" userId={userId} onSuccess={() => { }} devMode={true} />
|
||||
<TextField id="outlined-basic" label="App Name" variant="outlined" value={appName} onChange={(e) => setAppName(e.target.value)} />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user