From 57f8450bebd906e299aa45e32285e851a515d63b Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 28 Sep 2025 20:49:00 +0000 Subject: [PATCH] Visual edit in Lovable --- src/components/auth/AuthButtons.tsx | 57 +++++++++-------------------- 1 file changed, 18 insertions(+), 39 deletions(-) diff --git a/src/components/auth/AuthButtons.tsx b/src/components/auth/AuthButtons.tsx index efcc246d..913cdf1f 100644 --- a/src/components/auth/AuthButtons.tsx +++ b/src/components/auth/AuthButtons.tsx @@ -2,68 +2,51 @@ import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { Button } from '@/components/ui/button'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuLabel, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from '@/components/ui/dropdown-menu'; +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu'; import { User, Settings, LogOut, Trophy } from 'lucide-react'; import { useAuth } from '@/hooks/useAuth'; import { useToast } from '@/hooks/use-toast'; - export function AuthButtons() { - const { user, profile, signOut } = useAuth(); + const { + user, + profile, + signOut + } = useAuth(); const navigate = useNavigate(); - const { toast } = useToast(); + const { + toast + } = useToast(); const [loggingOut, setLoggingOut] = useState(false); - const handleSignOut = async () => { setLoggingOut(true); try { await signOut(); toast({ title: "Signed out", - description: "You've been signed out successfully.", + description: "You've been signed out successfully." }); navigate('/'); } catch (error: any) { toast({ variant: "destructive", title: "Error signing out", - description: error.message, + description: error.message }); } finally { setLoggingOut(false); } }; - if (!user) { - return ( - <> - - - - ); + ; } - - return ( - + return