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

import Content from "@/components/MyPages/AccountPage/Content"

import styles from "./page.module.css"

import type { LangParams, PageArgs } from "@/types/params"

export default async function BenefitsPage({ params }: PageArgs<LangParams>) {
  const user = await serverClient().user.get()
  const accountPage = await serverClient().contentstack.accountPage.getBenefits(
    {
      lang: params.lang,
    }
  )

  return (
    <main className={styles.container}>
      <Content user={user} lang={params.lang} content={accountPage.content} />
    </main>
  )
}
