diff --git a/src/client/hooks/useGlobalItems.ts b/src/client/hooks/useGlobalItems.ts index da0c4fc..ecfff5b 100644 --- a/src/client/hooks/useGlobalItems.ts +++ b/src/client/hooks/useGlobalItems.ts @@ -10,6 +10,9 @@ interface GlobalItem { priceCents: number | null; imageUrl: string | null; description: string | null; + sourceUrl: string | null; + imageCredit: string | null; + imageSourceUrl: string | null; createdAt: string; } diff --git a/src/client/routes/global-items/$globalItemId.tsx b/src/client/routes/global-items/$globalItemId.tsx index 80b2af7..e4533fb 100644 --- a/src/client/routes/global-items/$globalItemId.tsx +++ b/src/client/routes/global-items/$globalItemId.tsx @@ -62,7 +62,7 @@ function GlobalItemDetail() { {/* Image */} -
+ {item.imageCredit && Photo: {item.imageCredit}} + {item.imageCredit && item.imageSourceUrl && ยท } + {item.imageSourceUrl && ( + + Source + + )} +
+ )} + {!(item.imageCredit || item.imageSourceUrl) && } + {/* Header */}@@ -169,6 +188,20 @@ function GlobalItemDetail() {
{item.description}