From 1a8a159a71fd018bab0e14d9df952c53ae5ea062 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Fri, 15 May 2026 00:08:25 +0900 Subject: Add bands/artists index pages and redirect top page - / now redirects to /bands - /bands shows band list with "+ Band" link - /artists shows artist list with "+ Artist" link - Nav simplified to Bands / Artists only Co-Authored-By: Claude Sonnet 4.6 --- app/routes/home.tsx | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'app/routes/home.tsx') diff --git a/app/routes/home.tsx b/app/routes/home.tsx index ef6912d..9795ba8 100644 --- a/app/routes/home.tsx +++ b/app/routes/home.tsx @@ -1,31 +1,9 @@ -import { Link, useLoaderData } from "react-router"; -import { listBands } from "~/lib/db.server"; +import { redirect } from "react-router"; export function loader() { - return { bands: listBands() }; + return redirect("/bands"); } export default function Home() { - const { bands } = useLoaderData(); - return ( -
- {bands.length === 0 ? ( -

- バンドがまだありません。{" "} - 追加する -

- ) : ( -
    - {bands.map((band) => ( -
  • - {band.name} - {band.status === "hiatus" && ( - 活動休止 - )} -
  • - ))} -
- )} -
- ); + return null; } -- cgit v1.2.3