'use client'; import { CardHeader } from '@/components/ui'; import { SubmitButton } from '@/components/default'; import { useRouter } from 'next/navigation'; import { useAuth } from '@/components/context'; import { signOut } from '@/lib/actions'; export const SignOut = () => { const { isLoading, refreshUserData } = useAuth(); const router = useRouter(); const handleSignOut = async () => { const result = await signOut(); if (result?.success) { await refreshUserData(); router.push('/sign-in'); } }; return (
Sign Out
); };