fix: disable passkey button when it's disabled

This commit is contained in:
diced 2025-02-20 11:14:05 -08:00
parent a97decfb0c
commit 60e9b52100
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1

View file

@ -296,17 +296,19 @@ export default function Login({ config }: InferGetServerSidePropsType<typeof get
<Divider label='or' /> <Divider label='or' />
)} )}
<Button {config.mfa.passkeys && (
onClick={handlePasskeyLogin} <Button
size='md' onClick={handlePasskeyLogin}
fullWidth size='md'
variant='outline' fullWidth
leftSection={<IconKey size='1rem' />} variant='outline'
color={passkeyErrored ? 'red' : undefined} leftSection={<IconKey size='1rem' />}
loading={passkeyLoading} color={passkeyErrored ? 'red' : undefined}
> loading={passkeyLoading}
Login with passkey >
</Button> Login with passkey
</Button>
)}
{config.features.userRegistration && ( {config.features.userRegistration && (
<Button <Button