import Image from "next/image";
import FilteredLightbox from "@/components/lightbox";
import { trpc } from "@/trpc/server";
import { TRPCProvider } from "@/trpc/client";

export default async function Photos(): Promise<React.JSX.Element> {
  const { data: images } = await trpc.photos.list();

  return (
    <div className="mx-auto">
      <TRPCProvider>
        <FilteredLightbox imageData={images}/>
      </TRPCProvider>
    </div>
  );
}
