From d944f11581553c5e038b33fa4558566713f6d1f4 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sat, 9 May 2026 00:46:32 +0900 Subject: Add band description/status fields and redesign index page - bands table: add description (TEXT) and status (TEXT DEFAULT 'active') via ALTER TABLE migrations (active / hiatus / disbanded) - Home page: minimal monochrome index listing name, area, status - Band detail: show description below title, status alongside area - Band new/edit forms: textarea for description, select for status Co-Authored-By: Claude Sonnet 4.6 --- app/routes/home.tsx | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'app/routes/home.tsx') diff --git a/app/routes/home.tsx b/app/routes/home.tsx index 3df4ab5..5600645 100644 --- a/app/routes/home.tsx +++ b/app/routes/home.tsx @@ -5,38 +5,44 @@ export function loader() { return { bands: listBands() }; } +const STATUS_LABEL: Record = { + active: "活動中", + hiatus: "活動休止", + disbanded: "解散", +}; + export default function Home() { const { bands } = useLoaderData(); return ( -
-
-

Bands

- - + New Band - -
+
{bands.length === 0 ? ( -

- まだバンドがありません。{" "} - +

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

) : ( -
    +
      {bands.map((band) => ( -
    • - - +
    • +
      + {band.name} - - {band.area && ( - {band.area} + + {band.description && ( +

      + {band.description} +

      )} - +
      +
      + {band.area && {band.area}} + {STATUS_LABEL[band.status] ?? band.status} +
    • ))}
    -- cgit v1.2.3