Fix: Approve database migration

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 14:40:48 +00:00
parent 0db54b402b
commit 4ab59e2ec2
29 changed files with 180 additions and 112 deletions

View File

@@ -8,6 +8,7 @@ import { useAuth } from '@/hooks/useAuth';
import { useProfile } from '@/hooks/useProfile';
import { useToast } from '@/hooks/use-toast';
import { useAuthModal } from '@/hooks/useAuthModal';
import { getErrorMessage } from '@/lib/errorHandler';
export function AuthButtons() {
const { user, loading: authLoading, signOut } = useAuth();
@@ -25,11 +26,12 @@ export function AuthButtons() {
description: "You've been signed out successfully."
});
navigate('/');
} catch (error: any) {
} catch (error) {
const errorMsg = getErrorMessage(error);
toast({
variant: "destructive",
title: "Error signing out",
description: error.message
description: errorMsg
});
} finally {
setLoggingOut(false);