'use client';

import { useRouter } from 'next/navigation';
import { authClient } from '@/lib/auth-client';

export function SignOutButton() {
  const router = useRouter();

  return (
    <button
      type="button"
      className="text-sm text-fd-muted-foreground hover:text-fd-foreground"
      onClick={async () => {
        await authClient.signOut();
        router.push('/login');
      }}
    >
      Sign out
    </button>
  );
}
