fix: clean up unused imports and improve TOTP QR code rendering

This commit is contained in:
Linus Rath
2026-04-21 17:30:00 +02:00
parent 794001fdbd
commit 1f60671886
2 changed files with 2 additions and 4 deletions
@@ -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() {
<p className="text-xs text-muted-foreground">{t('totp.setup_instructions')}</p>
{qrDataUrl && (
<div className="flex justify-center">
{ /* eslint-disable-next-line @next/next/no-img-element */ }
<img src={qrDataUrl} alt="TOTP QR code" className="rounded bg-white p-2" />
</div>
)}
+1 -2
View File
@@ -190,8 +190,7 @@ export const useAccountSecurityStore = create<AccountSecurityState>()((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({