import { ResetPasswordPage } from '@/features/password-reset/reset-password-page';
import { createFileRoute, redirect } from '@tanstack/react-router';

export const Route = createFileRoute('/reset-password')({
  beforeLoad: ({ context }) => {
    if (context.auth.isAuthenticated) {
      throw redirect({ to: '/' });
    }
  },
  component: ResetPasswordRouteComponent,
});

function ResetPasswordRouteComponent() {
  return <ResetPasswordPage />;
}
