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

import MyPagesMobileDropdown from "@/components/Current/Header/MyPagesMobileDropdown"
import { setLang } from "@/i18n/serverContext"

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

export default async function MyPagesMobileDropdownPage({
  params,
}: PageArgs<LangParams>) {
  setLang(params.lang)
  const navigation = await serverClient().contentstack.myPages.navigation.get()
  if (!navigation) return null
  return <MyPagesMobileDropdown navigation={navigation} />
}
