diff --git a/components/public/material-poster.tsx b/components/public/material-poster.tsx index 86fc6f6..c3d82dd 100644 --- a/components/public/material-poster.tsx +++ b/components/public/material-poster.tsx @@ -1,6 +1,7 @@ "use client"; import Image from "next/image"; +import Link from "next/link"; import { useRef, type PointerEvent } from "react"; import type { @@ -60,6 +61,7 @@ export function MaterialPoster({ topColors, bottomColors, interactive = false, + linkMaterials = false, onArtworkMove, className, bleeding = [], @@ -71,6 +73,7 @@ export function MaterialPoster({ topColors: [string, string]; bottomColors: [string, string]; interactive?: boolean; + linkMaterials?: boolean; onArtworkMove?: (offset: { x: number; y: number }) => void; className?: string; artworkScale: number; @@ -214,16 +217,34 @@ export function MaterialPoster({

MATERIALS

LV.90

- {materials.map((material, index) => ( -
-
- {material.imageUrl ? : null} + {materials.map((material, index) => { + const materialCard = ( + <> +
+ {material.imageUrl ? : null} +
+
+ ×{material.amount.toLocaleString("en-US")} +
+ + ); + const className = "aspect-[0.72] overflow-hidden rounded-[1.3cqw] bg-black/95 ring-1 ring-white/10"; + + return linkMaterials ? ( + + {materialCard} + + ) : ( +
+ {materialCard}
-
- ×{material.amount.toLocaleString("en-US")} -
-
- ))} + ); + })}
diff --git a/components/public/structured-guide.tsx b/components/public/structured-guide.tsx index 5098b10..0d4a0e8 100644 --- a/components/public/structured-guide.tsx +++ b/components/public/structured-guide.tsx @@ -240,6 +240,7 @@ function GuideOverview({ topColors={guide.posterTopColors} bottomColors={guide.posterBottomColors} bleeding={guide.posterBleeding} + linkMaterials />