import { LoginForm } from "@code/auth/web";
import { useNavigate } from "react-router";

import type { Route } from "./+types/page";

export const meta = (_args: Route.MetaArgs) => [
  { title: "Sign in | Zopu" },
  { content: "Sign in to Zopu", name: "description" },
];

export default function LoginRoute() {
  const navigate = useNavigate();

  return <LoginForm onSuccess={() => navigate("/", { replace: true })} />;
}
