import { ArtworkColorProcessor } from "@/components/artworks/ArtworkColorProcessor"; import { ArtworksTable } from "@/components/artworks/ArtworksTable"; import { getArtworksPage } from "@/lib/queryArtworks"; export default async function ArtworksPage({ searchParams }: { searchParams?: { // type?: string; published?: string; // groupBy?: string; // year?: string; // album?: string; cursor?: string; } }) { const { // type = "all", published = "all", // groupBy = "year", // year, // album, cursor = undefined } = await searchParams ?? {}; // const groupMode = groupBy === "album" ? "album" : "year"; // const groupId = groupMode === "album" ? album ?? "all" : year ?? "all"; // Filter by type // if (type !== "all") { // where.typeId = type === "none" ? null : type; // } // Filter by published status // if (published === "published") { // where.published = true; // } else if (published === "unpublished") { // where.published = false; // } else if (published === "needsWork") { // where.needsWork = true; // } // Filter by group (year or album) // if (groupMode === "year" && groupId !== "all") { // where.year = parseInt(groupId); // } else if (groupMode === "album" && groupId !== "all") { // where.albumId = groupId; // } const { items, nextCursor } = await getArtworksPage( { published, cursor, take: 48 } ) return (
No artworks found.
// )} //