mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
add subpage for register circuit
This commit is contained in:
36
sdk/tests/web-app/src/app/register/page.tsx
Normal file
36
sdk/tests/web-app/src/app/register/page.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
'use client';
|
||||
|
||||
import { OpenPassportQRcode } from '../../../../../src/QRcode/OpenPassportQRcode';
|
||||
// import { OpenPassportQRcode } from '../../../../dist/bundle.web.js'
|
||||
import { TextField } from '@mui/material';
|
||||
import { useState } from 'react';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { COMMITMENT_TREE_TRACKER_URL } from '../../../../../../common/src/constants/constants';
|
||||
export default function Register() {
|
||||
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">
|
||||
<div className="text-4xl text-black ">Register circuit</div>
|
||||
<OpenPassportQRcode
|
||||
appName={appName}
|
||||
scope="test"
|
||||
userId={userId}
|
||||
olderThan="18"
|
||||
nationality="France"
|
||||
devMode={true}
|
||||
circuit="register"
|
||||
attestationId="PASSPORT"
|
||||
merkleTreeUrl={COMMITMENT_TREE_TRACKER_URL}
|
||||
/>
|
||||
|
||||
<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