Replace non-strict equality with strict equality and fix undefined access

- Use !== instead of != for null comparisons
- Update MFA status indicator from Pill to Badge component
This commit is contained in:
Torsten Dittmann
2025-05-30 15:56:37 +02:00
parent e22ec6ae52
commit cc3f3a7141
3 changed files with 5 additions and 5 deletions
@@ -95,7 +95,7 @@
{#if enabledFactors.length > 1}
<span class="with-separators eyebrow-heading-3">or</span>
<div class="u-flex-vertical u-gap-8">
{#if factors.totp && challengeType != null && challengeType != AuthenticationFactor.Totp}
{#if factors.totp && challengeType !== null && challengeType !== AuthenticationFactor.Totp}
<Button
secondary
fullWidth
@@ -160,11 +160,11 @@
<span class="icon-device-mobile" aria-hidden="true"></span>
</div>
<Layout.Stack gap="xxxs">
<Layout.Stack gap="s">
<Layout.Stack gap="s" direction="row">
<Typography.Text variant="m-600"
>Authenticator app</Typography.Text>
{#if $factors.totp}
<Pill>connected</Pill>
<Badge variant="secondary" content="connected" size="s" />
{/if}
</Layout.Stack>
<Typography.Text variant="m-400">
@@ -102,9 +102,9 @@
$: hasPaymentError =
defaultPaymentMethod?.lastError ||
defaultPaymentMethod.expired ||
defaultPaymentMethod?.expired ||
backupPaymentMethod?.lastError ||
backupPaymentMethod.expired;
backupPaymentMethod?.expired;
</script>
<CardGrid>