diff --git a/src/app/(normal)/artworks/single/[id]/page.tsx b/src/app/(normal)/artworks/single/[id]/page.tsx index f6e746a..4a9d23d 100644 --- a/src/app/(normal)/artworks/single/[id]/page.tsx +++ b/src/app/(normal)/artworks/single/[id]/page.tsx @@ -8,7 +8,12 @@ import { PlayCircle } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; -export default async function SingleArtworkPage({ params }: { params: { id: string }; searchParams: Record; }) { +export default async function SingleArtworkPage({ + params, +}: { + params: { id: string }; + searchParams: Record; +}) { const { id } = await params; const artwork = await prisma.artwork.findUnique({ where: { @@ -24,34 +29,44 @@ export default async function SingleArtworkPage({ params }: { params: { id: stri tags: true, variants: true, timelapse: { where: { enabled: true } }, - } - }) + }, + }); - if (!artwork) return
Artwork with this ID could not be found
+ if (!artwork) return
Artwork with this ID could not be found
; - const { width, height } = artwork.variants.find((v) => v.type === "resized") ?? { width: 0, height: 0 } + const { width, height } = artwork.variants.find( + (v) => v.type === "resized", + ) ?? { width: 0, height: 0 }; const colors = - artwork.colors?.map((c) => c.color?.hex).filter((hex): hex is string => Boolean(hex)) ?? [] + artwork.colors + ?.map((c) => c.color?.hex) + .filter((hex): hex is string => Boolean(hex)) ?? []; const gradientColors = colors.length ? colors.join(", ") - : "rgba(0,0,0,0.1), rgba(0,0,0,0.03)" - + : "rgba(0,0,0,0.1), rgba(0,0,0,0.03)"; return ( -
+
-
+
+ +
{artwork.name ? ( -
-

{artwork.name}

+
+
+

+ {artwork.name} +

+
) : null}
-
@@ -94,7 +109,10 @@ export default async function SingleArtworkPage({ params }: { params: { id: stri tags={artwork.tags} />
+
+ +
-
+
); -} \ No newline at end of file +} diff --git a/src/components/artworks/ContextBackButton.tsx b/src/components/artworks/ContextBackButton.tsx index b98aa20..10da751 100644 --- a/src/components/artworks/ContextBackButton.tsx +++ b/src/components/artworks/ContextBackButton.tsx @@ -10,7 +10,7 @@ const FROM_TO_PATH: Record = { "animal-index": "/artworks/animalstudies/index" }; -export function ContextBackButton() { +export function ContextBackButton({ className }: { className?: string }) { const router = useRouter(); const sp = useSearchParams(); const from = sp.get("from") ?? ""; @@ -19,7 +19,7 @@ export function ContextBackButton() { if (!target) return null; return ( -
+