diff --git a/app/routes/home.tsx b/app/routes/home.tsx index 398e47c..700d14a 100644 --- a/app/routes/home.tsx +++ b/app/routes/home.tsx @@ -1,13 +1,5 @@ -import type { Route } from "./+types/home"; -import { Welcome } from "../welcome/welcome"; +import { redirect } from "react-router"; -export function meta({}: Route.MetaArgs) { - return [ - { title: "New React Router App" }, - { name: "description", content: "Welcome to React Router!" }, - ]; -} - -export default function Home() { - return ; +export function loader() { + throw redirect("/forms"); } diff --git a/lib/api.ts b/lib/api.ts index e9e3ae9..721b798 100644 --- a/lib/api.ts +++ b/lib/api.ts @@ -120,8 +120,6 @@ export async function register(email: string, password: string) { const data = await res.json().catch(() => null) throw new Error(data?.message ?? "Registration failed") } - - return res.json() } export async function logout() {