aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/routes
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/routes')
-rw-r--r--frontend/app/routes/_index.tsx2
-rw-r--r--frontend/app/routes/dashboard.tsx4
-rw-r--r--frontend/app/routes/golf.$gameId.play.tsx4
-rw-r--r--frontend/app/routes/golf.$gameId.watch.tsx4
-rw-r--r--frontend/app/routes/login.tsx8
-rw-r--r--frontend/app/routes/logout.tsx2
6 files changed, 12 insertions, 12 deletions
diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index.tsx
index 06cca78..651a61c 100644
--- a/frontend/app/routes/_index.tsx
+++ b/frontend/app/routes/_index.tsx
@@ -1,4 +1,4 @@
-import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
+import type { LoaderFunctionArgs, MetaFunction } from "react-router";
import { ensureUserNotLoggedIn } from "../.server/auth";
import BorderedContainer from "../components/BorderedContainer";
import NavigateLink from "../components/NavigateLink";
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx
index ab170b5..78ed531 100644
--- a/frontend/app/routes/dashboard.tsx
+++ b/frontend/app/routes/dashboard.tsx
@@ -1,5 +1,5 @@
-import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
-import { Form, useLoaderData } from "@remix-run/react";
+import type { LoaderFunctionArgs, MetaFunction } from "react-router";
+import { Form, useLoaderData } from "react-router";
import { ensureUserLoggedIn } from "../.server/auth";
import { apiGetGames } from "../api/client";
import BorderedContainer from "../components/BorderedContainer";
diff --git a/frontend/app/routes/golf.$gameId.play.tsx b/frontend/app/routes/golf.$gameId.play.tsx
index e523187..dc8eb38 100644
--- a/frontend/app/routes/golf.$gameId.play.tsx
+++ b/frontend/app/routes/golf.$gameId.play.tsx
@@ -1,6 +1,6 @@
-import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
-import { useLoaderData } from "@remix-run/react";
import { useHydrateAtoms } from "jotai/utils";
+import type { LoaderFunctionArgs, MetaFunction } from "react-router";
+import { useLoaderData } from "react-router";
import { ensureUserLoggedIn } from "../.server/auth";
import {
ApiAuthTokenContext,
diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx
index fed06aa..674abc4 100644
--- a/frontend/app/routes/golf.$gameId.watch.tsx
+++ b/frontend/app/routes/golf.$gameId.watch.tsx
@@ -1,6 +1,6 @@
-import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
-import { useLoaderData } from "@remix-run/react";
import { useHydrateAtoms } from "jotai/utils";
+import type { LoaderFunctionArgs, MetaFunction } from "react-router";
+import { useLoaderData } from "react-router";
import { ensureUserLoggedIn } from "../.server/auth";
import {
ApiAuthTokenContext,
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: {
diff --git a/frontend/app/routes/logout.tsx b/frontend/app/routes/logout.tsx
index d697be2..9616b4d 100644
--- a/frontend/app/routes/logout.tsx
+++ b/frontend/app/routes/logout.tsx
@@ -1,4 +1,4 @@
-import type { ActionFunctionArgs } from "@remix-run/node";
+import type { ActionFunctionArgs } from "react-router";
import { logout } from "../.server/auth";
export async function action({ request }: ActionFunctionArgs) {