import { OnboardLoginPage } from '@/features/onboard/onboard-login-page';
import { createFileRoute, redirect } from '@tanstack/react-router';

export const Route = createFileRoute('/onboard/')({
  beforeLoad: ({ context }) => {
    if (!context.auth.isAuthenticated) {
      throw redirect({ to: '/login', search: { redirect: '/onboard/create-complex' } });
    }
  },
  component: OnboardLoginPage,
});
