feat: my profile - removed all parallel routes * Removed all parallel routes on my-profile * Fixed suspense * Moved components into myprofile folder * Turn off browser cache on myprofile * Clear router cache when editing profile * Clear route cache when adding new credit card * PR fixes Approved-by: Joakim Jäderberg
28 lines
671 B
TypeScript
28 lines
671 B
TypeScript
import { Suspense } from "react"
|
|
|
|
import { serverClient } from "@/lib/trpc/server"
|
|
|
|
import Profile from "@/components/MyPages/myprofile/profile/profile"
|
|
import TrackingSDK from "@/components/TrackingSDK"
|
|
|
|
import type { LangParams, PageArgs } from "@/types/params"
|
|
|
|
export { generateMetadata } from "@/utils/generateMetadata"
|
|
|
|
export default async function ProfilePage({}: PageArgs<LangParams>) {
|
|
const accountPage = await serverClient().contentstack.accountPage.get()
|
|
|
|
if (!accountPage) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<Profile />
|
|
<Suspense fallback={null}>
|
|
<TrackingSDK pageData={accountPage.tracking} />
|
|
</Suspense>
|
|
</>
|
|
)
|
|
}
|