Merged in fix/edit-profile-tracking (pull request #1446)
feat:editprofile - added tracking * feat:editprofile - added tracking * Refactor Approved-by: Erik Tiekstra Approved-by: Christian Andolf
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
import { getProfile } from "@/lib/trpc/memoizedRequests"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import Form from "@/components/Forms/Edit/Profile"
|
||||
import TrackingSDK from "@/components/TrackingSDK"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
export default async function EditProfileSlot() {
|
||||
const accountPage = await serverClient().contentstack.accountPage.get()
|
||||
const user = await getProfile()
|
||||
|
||||
if (!user || "error" in user) {
|
||||
return null
|
||||
}
|
||||
@@ -13,6 +17,7 @@ export default async function EditProfileSlot() {
|
||||
<>
|
||||
<div className={styles.container}>
|
||||
<Form user={user} />
|
||||
{accountPage && <TrackingSDK pageData={accountPage.tracking} />}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -10,14 +10,10 @@ 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 />
|
||||
<TrackingSDK pageData={accountPage.tracking} />
|
||||
{accountPage && <TrackingSDK pageData={accountPage.tracking} />}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user