Refactor code

This commit is contained in:
2026-02-03 12:17:47 +01:00
parent ea5eb6fa59
commit 8572e22c5d
185 changed files with 1268 additions and 1458 deletions

View File

@ -1,14 +1,17 @@
"use client"
"use client";
// import { PortfolioImage } from "@/generated/prisma";
// Possibly unused: no references found in `src/app` or `src/components`.
import { cn } from "@/lib/utils";
import { ArtworkWithRelations } from "@/types/Artwork";
import type { ArtworkWithRelations } from "@/types/Artwork";
import Image from "next/image";
import Link from "next/link";
import { useSearchParams } from "next/navigation";
import type { CSSProperties } from "react";
import { useState } from "react";
import { Button } from "../ui/button";
// Client-side artwork gallery with incremental pagination.
export default function ArtworkGallery({
initialArtworks,
initialCursor,
@ -52,9 +55,7 @@ export default function ArtworkGallery({
return (
<div className="w-full flex flex-col gap-4">
<div
className="flex flex-wrap gap-4"
>
<div className="flex flex-wrap gap-4">
{artworks.map((artwork) => (
<div key={artwork.id} style={{ width: 200, height: 200 }}>
<Link href={`/artworks/${artwork.id}`}>
@ -66,7 +67,7 @@ export default function ArtworkGallery({
)}
style={{
'--tw-border-opacity': 1,
} as React.CSSProperties}
} as CSSProperties}
>
<div
className={cn(
@ -96,4 +97,4 @@ export default function ArtworkGallery({
) : null}
</div>
);
}
}