refactor(ui): ♻️ update demo profil page
This commit is contained in:
parent
db07adbe22
commit
91eefc520f
|
@ -1,8 +1,31 @@
|
|||
export default function Profil() {
|
||||
import { Button } from 'univoq'
|
||||
import LoginForm from '../../islands/LoginForm.tsx'
|
||||
import PassKeyRegister from '../../islands/PassKeyRegister.tsx'
|
||||
import type { SessionPageProps } from '../../src/session/mod.ts'
|
||||
import type { User } from '@cohabit/ressources_manager/mod.ts'
|
||||
|
||||
export default function Profil({ state }: SessionPageProps) {
|
||||
const user = state.session?.get<User>('user')
|
||||
|
||||
if (user) {
|
||||
return (
|
||||
<>
|
||||
<h1>Profil</h1>
|
||||
<section></section>
|
||||
<h1>Mon compte</h1>
|
||||
<section>
|
||||
<pre>{ JSON.stringify(user, null, 2) }</pre>
|
||||
</section>
|
||||
<div>
|
||||
<PassKeyRegister />
|
||||
<Button label='Disconnect' variant='primary'>Disconnect</Button>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>Accéder à mon compte</h1>
|
||||
<LoginForm />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue