From a3a2bc9dc1c339e26cf93e3b510f280acaab5027 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 10 Mar 2025 03:01:44 +0900
Subject: feat(fontend): migrate from Remix to React Router

---
 frontend/app/routes/login.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'frontend/app/routes/login.tsx')

diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx
index 5ca6217..dd5b9e7 100644
--- a/frontend/app/routes/login.tsx
+++ b/frontend/app/routes/login.tsx
@@ -2,8 +2,8 @@ import type {
 	ActionFunctionArgs,
 	LoaderFunctionArgs,
 	MetaFunction,
-} from "@remix-run/node";
-import { Form, json, useActionData } from "@remix-run/react";
+} from "react-router";
+import { Form, data, useActionData } from "react-router";
 import { ensureUserNotLoggedIn, login } from "../.server/auth";
 import BorderedContainer from "../components/BorderedContainer";
 import InputText from "../components/InputText";
@@ -22,7 +22,7 @@ export async function action({ request }: ActionFunctionArgs) {
 	const username = String(formData.get("username"));
 	const password = String(formData.get("password"));
 	if (username === "" || password === "") {
-		return json(
+		return data(
 			{
 				message: "ユーザー名またはパスワードが誤っています",
 				errors: {
@@ -40,7 +40,7 @@ export async function action({ request }: ActionFunctionArgs) {
 		await login(request);
 	} catch (error) {
 		if (error instanceof Error) {
-			return json(
+			return data(
 				{
 					message: error.message,
 					errors: {
-- 
cgit v1.2.3-70-g09d2

