Fix: Resolve remaining TypeScript errors

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 02:54:43 +00:00
parent 07420a67bf
commit 516f7c4c41
14 changed files with 49 additions and 49 deletions

View File

@@ -147,7 +147,7 @@ export default function Auth() {
const { handlePostAuthFlow } = await import('@/lib/authService');
const postAuthResult = await handlePostAuthFlow(data.session, 'password');
if (postAuthResult.success && postAuthResult.data.shouldRedirect) {
if (postAuthResult.success && postAuthResult.data?.shouldRedirect) {
// Get the TOTP factor ID
const { data: factors } = await supabase.auth.mfa.listFactors();
const totpFactor = factors?.totp?.find(f => f.status === 'verified');
@@ -189,7 +189,7 @@ export default function Auth() {
errorMessage = 'Invalid email or password. Please try again.';
} else if (errorMsg.includes('Email not confirmed')) {
errorMessage = 'Please confirm your email address before signing in.';
} else if (error.message.includes('Too many requests')) {
} else if (error instanceof Error && error.message.includes('Too many requests')) {
errorMessage = 'Too many login attempts. Please wait a few minutes and try again.';
}