import Image from "@scandic-hotels/design-system/Image" import { Typography } from "@scandic-hotels/design-system/Typography" import { TrackingSDK } from "@scandic-hotels/tracking/TrackingSDK" import { serverClient } from "@/lib/trpc/server" import Blocks from "@/components/Blocks" import SectionHeader from "@/components/Section/Header/Deprecated" import { getIntl } from "@/i18n" import styles from "./page.module.css" import type { LangParams, PageArgs } from "@/types/params" export { generateMetadata } from "@/utils/metadata/generateMetadata" export default async function MyPages({}: PageArgs< LangParams & { path: string[] } >) { const caller = await serverClient() const accountPageRes = await caller.contentstack.accountPage.get() const intl = await getIntl() if (!accountPageRes) { return null } const { tracking, accountPage } = accountPageRes const { heading, preamble, hero_image, hero_image_active, content } = accountPage return ( <> {hero_image_active ? ( {heading} {hero_image ? ( ) : null} ) : ( )} {content?.length ? ( ) : ( {intl.formatMessage({ id: "myPages.missingContent", defaultMessage: "No content published", })} )} > ) }
{intl.formatMessage({ id: "myPages.missingContent", defaultMessage: "No content published", })}