import { serverClient } from "@/lib/trpc/server"

import StaticPage from ".."

export default async function CollectionPage() {
  const caller = await serverClient()
  const collectionPageRes = await caller.contentstack.collectionPage.get()

  if (!collectionPageRes) {
    return null
  }

  const { tracking, collectionPage } = collectionPageRes

  return (
    <StaticPage
      content={collectionPage}
      tracking={tracking}
      pageType="collection"
    />
  )
}
