import { getJustifiedImages } from "@/actions/portfolio/getJustifiedImages";
import { JustifiedGallery } from "@/components/portfolio/JustifiedGallery";

export default async function PortfolioArtworksPage({ searchParams }: { searchParams: { year?: string; album?: string } }) {
  const { year, album } = await searchParams;
  const images = await getJustifiedImages(year, album, "art", false);

  if (!images) return null

  return (
    <main className="p-2 mx-auto max-w-screen-2xl">
      <JustifiedGallery images={images} rowHeight={340} gap={12} />
    </main>
  );
}