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}