fix: handle register response correctly
Docker Build and Push / build-and-push (push) Successful in 5m22s

This commit is contained in:
2026-02-22 13:40:26 +07:00
parent 89c75dfbbb
commit 08ea2d8530
2 changed files with 3 additions and 13 deletions
+3 -11
View File
@@ -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 <Welcome />;
export function loader() {
throw redirect("/forms");
}
-2
View File
@@ -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() {