diff --git a/components/settings/account-security-settings.tsx b/components/settings/account-security-settings.tsx index 0f29068c..5f2b445c 100644 --- a/components/settings/account-security-settings.tsx +++ b/components/settings/account-security-settings.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useEffect, useCallback, useMemo } from 'react'; +import { useState, useEffect, useMemo } from 'react'; import { useTranslations } from 'next-intl'; import QRCode from 'qrcode'; import * as OTPAuth from 'otpauth'; @@ -294,7 +294,6 @@ function TotpSection() {

{t('totp.setup_instructions')}

{qrDataUrl && (
- { /* eslint-disable-next-line @next/next/no-img-element */ } TOTP QR code
)} diff --git a/stores/account-security-store.ts b/stores/account-security-store.ts index 14cd096f..400339d0 100644 --- a/stores/account-security-store.ts +++ b/stores/account-security-store.ts @@ -190,8 +190,7 @@ export const useAccountSecurityStore = create()((set, get) const acc = result.list?.[0]; const aliasAddresses = acc?.aliases ? Object.values(acc.aliases) - .filter((a) => a?.enabled !== false && a?.name) - .map((a) => a?.name!) + .flatMap((a) => (a && a.enabled !== false && a.name ? [a.name] : [])) : []; const primaryEmail = acc?.name ? [acc.name] : []; set({