import { getProfile } from "@/lib/trpc/memoizedRequests"

import Form from "@/components/Forms/Edit/Profile"

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

export default async function EditProfileSlot({}: PageArgs<LangParams>) {
  const user = await getProfile()
  if (!user || "error" in user) {
    return null
  }
  return <Form user={user} />
}
