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/artist-index.tsx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 app/routes/artist-index.tsx (limited to 'app/routes/artist-index.tsx') diff --git a/app/routes/artist-index.tsx b/app/routes/artist-index.tsx new file mode 100644 index 0000000..9981567 --- /dev/null +++ b/app/routes/artist-index.tsx @@ -0,0 +1,33 @@ +import { Link, useLoaderData } from "react-router"; +import { listArtists } from "~/lib/db.server"; + +export function loader() { + return { artists: listArtists() }; +} + +export default function ArtistIndex() { + const { artists } = useLoaderData(); + return ( +
+
+

Artists

+ + Artist +
+ + {artists.length === 0 ? ( +

+ アーティストがまだありません。{" "} + 追加する +

+ ) : ( +
    + {artists.map((artist) => ( +
  • + {artist.name} +
  • + ))} +
+ )} +
+ ); +} -- cgit v1.2.3