mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 01:51:13 -05:00
Fix: Approve database migration
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user