feat: hide empty webauthn devices table when there are no devices (#4405)

pull/4406/head
Stephen Kent 2022-11-19 00:31:08 -08:00 committed by GitHub
parent 6f8b6adfb5
commit 2967500401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 28 deletions

View File

@ -83,6 +83,7 @@ export default function TwoFactorAuthSettings(props: Props) {
{"Add new device"}
</Button>
</Box>
{webauthnDevices ? (
<Box>
<Table>
<TableHead>
@ -94,8 +95,7 @@ export default function TwoFactorAuthSettings(props: Props) {
</TableRow>
</TableHead>
<TableBody>
{webauthnDevices
? webauthnDevices.map((x, idx) => {
{webauthnDevices.map((x, idx) => {
return (
<WebauthnDeviceItem
device={x}
@ -106,11 +106,11 @@ export default function TwoFactorAuthSettings(props: Props) {
key={`webauthn-device-${idx}`}
/>
);
})
: null}
})}
</TableBody>
</Table>
</Box>
) : null}
</Stack>
</Box>
</Paper>