import { LoginForm } from '@/components/login/form';
import { createFileRoute, redirect } from '@tanstack/react-router';

export const Route = createFileRoute('/sign-in')({
  beforeLoad: ({ context }) => {
    if (context.user) {
      throw redirect({ href: '/' });
    }
  },
  component: Page,
});

function Page() {
  return <LoginForm />;
}
