From 66d9c4157bab37246ad912ed36a5f236fe6f7914 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 12 Apr 2026 20:02:12 +0200 Subject: [PATCH] feat(29-02): update detail pages and LinkToGlobalItem to use GearImage Replace object-cover on item detail, global item detail, candidate detail, global items index, and LinkToGlobalItem. Detail pages use dominant color backgrounds. LinkToGlobalItem uses cover mode for 32px thumbnails. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/client/components/LinkToGlobalItem.tsx | 13 ++++++++----- .../routes/global-items/$globalItemId.tsx | 19 +++++++++++++++---- src/client/routes/global-items/index.tsx | 15 +++++++++++---- src/client/routes/items/$itemId.tsx | 19 +++++++++++++++---- .../$threadId/candidates/$candidateId.tsx | 15 ++++++++++++--- 5 files changed, 61 insertions(+), 20 deletions(-) diff --git a/src/client/components/LinkToGlobalItem.tsx b/src/client/components/LinkToGlobalItem.tsx index 6652f50..15ba1b0 100644 --- a/src/client/components/LinkToGlobalItem.tsx +++ b/src/client/components/LinkToGlobalItem.tsx @@ -1,5 +1,6 @@ import { Link } from "@tanstack/react-router"; import { useEffect, useState } from "react"; +import { GearImage } from "./GearImage"; import { useGlobalItem, useGlobalItems, @@ -177,11 +178,13 @@ export function LinkToGlobalItem({ className="w-full text-left px-3 py-2 hover:bg-gray-50 transition-colors flex items-center gap-2" > {item.imageUrl ? ( - +
+ +
) : (
)} diff --git a/src/client/routes/global-items/$globalItemId.tsx b/src/client/routes/global-items/$globalItemId.tsx index e4533fb..9576728 100644 --- a/src/client/routes/global-items/$globalItemId.tsx +++ b/src/client/routes/global-items/$globalItemId.tsx @@ -1,4 +1,5 @@ import { createFileRoute, Link } from "@tanstack/react-router"; +import { GearImage, imageContainerBg } from "../../components/GearImage"; import { useAuth } from "../../hooks/useAuth"; import { useFormatters } from "../../hooks/useFormatters"; import { useGlobalItem } from "../../hooks/useGlobalItems"; @@ -62,15 +63,25 @@ function GlobalItemDetail() {
{/* Image */} -
+
{item.imageUrl ? ( - {`${item.brand} ) : ( -
+
{/* Thumbnail */} -
+
{item.imageUrl ? ( - {`${item.brand} ) : ( -
+
) : ( -
+
{imageUrl ? ( - {item.name} ) : ( -
+
) : imageUrl ? ( -
- +
) : null}