import { Button } from 'components/shared/Button'; import { LoaderIcon } from 'components/shared/CustomIcon'; import { KeyIcon } from 'components/shared/CustomIcon/KeyIcon'; import { InlineNotification } from 'components/shared/InlineNotification'; import { Input } from 'components/shared/Input'; import { WavyBorder } from 'components/shared/WavyBorder'; import { useState } from 'react'; import { IconRight } from 'react-day-picker'; import { useSnowball } from 'utils/use-snowball'; type Props = { onDone: () => void; }; export const CreatePasskey = ({}: Props) => { const snowball = useSnowball(); const [name, setName] = useState(''); const auth = snowball.auth.passkey; const loading = !!auth.state.loading; async function createPasskey() { await auth.register(name); } return (
Create a passkey
Passkeys allow you to sign in securely without using passwords.
Give it a name
{ setName(e.target.value); }} />
{auth.state.error ? ( ) : ( )}
); };