fix: build errors in auth — remove stale ref, add Suspense boundary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-03-08 10:23:55 +01:00
parent 928a145f9a
commit 8dcb3d47e4
2 changed files with 9 additions and 2 deletions
+9 -1
View File
@@ -1,6 +1,6 @@
'use client'
import { useState, useRef } from 'react'
import { useState, useRef, Suspense } from 'react'
import { useRouter, useSearchParams } from 'next/navigation'
import { createClient } from '@/lib/supabase/client'
import { Button } from '@/components/ui/button'
@@ -10,6 +10,14 @@ import { useToast } from '@/components/ui/use-toast'
import { Loader2, ShieldCheck, Copy, Check } from 'lucide-react'
export default function MfaEnrollPage() {
return (
<Suspense>
<MfaEnrollContent />
</Suspense>
)
}
function MfaEnrollContent() {
const [qrCode, setQrCode] = useState<string | null>(null)
const [secret, setSecret] = useState<string | null>(null)
const [factorId, setFactorId] = useState<string | null>(null)
-1
View File
@@ -84,7 +84,6 @@ export function SecuritySettings() {
title: 'Lösenord uppdaterat',
description: 'Ditt lösenord har ändrats.',
})
setCurrentPassword('')
setNewPassword('')
setConfirmPassword('')
} catch {