From 21255f85572df0920c7d53bcc67bb73507cd95dc Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Mon, 3 Mar 2025 07:50:11 +0000 Subject: [PATCH] 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 --- .../(live)/(protected)/my-pages/profile/edit/page.tsx | 5 +++++ .../app/[lang]/(live)/(protected)/my-pages/profile/page.tsx | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx index f9f17783a..881bc602e 100644 --- a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx @@ -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() { <>
+ {accountPage && }
) diff --git a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx index 24823557f..6c0cf9874 100644 --- a/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx @@ -10,14 +10,10 @@ export { generateMetadata } from "@/utils/generateMetadata" export default async function ProfilePage({}: PageArgs) { const accountPage = await serverClient().contentstack.accountPage.get() - if (!accountPage) { - return null - } - return ( <> - + {accountPage && } ) }