"use client"; import { useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; import { createClient } from "@/lib/supabase/client"; import { routes } from "@/lib/routes"; export function LogoutButton() { const router = useRouter(); const logout = async () => { const supabase = createClient(); await supabase.auth.signOut(); router.push(routes.home); router.refresh(); }; return ; }