diff --git a/frontend/app/components/header/HeaderLoginButton.tsx b/frontend/app/components/header/HeaderLoginButton.tsx index 12fa90e0..582392ba 100644 --- a/frontend/app/components/header/HeaderLoginButton.tsx +++ b/frontend/app/components/header/HeaderLoginButton.tsx @@ -8,7 +8,7 @@ const HeaderLoginButton = () => { diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index/route.tsx similarity index 56% rename from frontend/app/routes/_index.tsx rename to frontend/app/routes/_index/route.tsx index bff60b90..f52735b6 100644 --- a/frontend/app/routes/_index.tsx +++ b/frontend/app/routes/_index/route.tsx @@ -2,8 +2,11 @@ import { redirect, type MetaFunction } from '@remix-run/cloudflare'; export const meta: MetaFunction = () => { return [ - { title: 'New Remix App' }, - { name: 'description', content: 'Welcome to Remix!' }, + { title: 'KITCC Library' }, + { + name: 'KITCCが所有する書籍を管理するWebアプリ', + content: 'Welcome to KITCC Library!', + }, ]; }; diff --git a/frontend/app/routes/home._index.tsx b/frontend/app/routes/home._index/route.tsx similarity index 100% rename from frontend/app/routes/home._index.tsx rename to frontend/app/routes/home._index/route.tsx diff --git a/frontend/app/routes/home.books.$bookId.tsx b/frontend/app/routes/home.books.$bookId/route.tsx similarity index 97% rename from frontend/app/routes/home.books.$bookId.tsx rename to frontend/app/routes/home.books.$bookId/route.tsx index 4bd5385d..c2dd892e 100644 --- a/frontend/app/routes/home.books.$bookId.tsx +++ b/frontend/app/routes/home.books.$bookId/route.tsx @@ -59,7 +59,7 @@ export const action = async ({ request }: ActionFunctionArgs) => { // 未ログインの場合 if (!session.has('userId')) { session.flash('error', 'ログインしてください'); - return redirect('/auth/login', { + return redirect('/login', { headers: { 'Set-Cookie': await commitSession(session), }, @@ -88,7 +88,7 @@ export const action = async ({ request }: ActionFunctionArgs) => { }); case 401: session.flash('error', 'ログインしてください'); - return redirect('/auth/login', { + return redirect('/login', { headers: { 'Set-Cookie': await commitSession(session), }, diff --git a/frontend/app/routes/home.mypage.tsx b/frontend/app/routes/home.mypage/route.tsx similarity index 93% rename from frontend/app/routes/home.mypage.tsx rename to frontend/app/routes/home.mypage/route.tsx index 6571ca5f..8d2159ec 100644 --- a/frontend/app/routes/home.mypage.tsx +++ b/frontend/app/routes/home.mypage/route.tsx @@ -7,7 +7,7 @@ export const loader = async ({ request }: LoaderFunctionArgs) => { // 未ログインの場合 if (!session.has('userId')) { // ログインページへリダイレクト - return redirect('/auth/login'); + return redirect('/login'); } return null; diff --git a/frontend/app/routes/home.tsx b/frontend/app/routes/home/route.tsx similarity index 100% rename from frontend/app/routes/home.tsx rename to frontend/app/routes/home/route.tsx diff --git a/frontend/app/routes/auth.login.tsx b/frontend/app/routes/login/route.tsx similarity index 99% rename from frontend/app/routes/auth.login.tsx rename to frontend/app/routes/login/route.tsx index 2bf8d6f3..eaa2b761 100644 --- a/frontend/app/routes/auth.login.tsx +++ b/frontend/app/routes/login/route.tsx @@ -80,7 +80,7 @@ export const action = async ({ request }: ActionFunctionArgs) => { session.flash('error', 'エラーが発生しました'); } - return redirect('/auth/login', { + return redirect('/login', { headers: { 'Set-Cookie': await commitSession(session), }, diff --git a/frontend/test/routes/auth.login.test.tsx b/frontend/test/routes/login.test.tsx similarity index 98% rename from frontend/test/routes/auth.login.test.tsx rename to frontend/test/routes/login.test.tsx index 71e1e3ff..4d8ff667 100644 --- a/frontend/test/routes/auth.login.test.tsx +++ b/frontend/test/routes/login.test.tsx @@ -2,7 +2,7 @@ import type * as remixruncloudflare from '@remix-run/cloudflare'; import { ActionFunctionArgs, LoaderFunctionArgs } from '@remix-run/cloudflare'; import { createRemixStub } from '@remix-run/testing'; import { screen } from '@testing-library/react'; -import LoginPage, { action, loader } from '~/routes/auth.login'; +import LoginPage, { action, loader } from '~/routes/login/route'; import { customRender } from '../helpers/wrapper'; import { redirect } from '../mocks/@remix-run/cloudflare';