feat(SW-266): Replacing static metadata with data from Contentstack on Loyalty pages and Account Pages
This commit is contained in:
@@ -5,11 +5,20 @@ import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import TrackingSDK from "@/components/TrackingSDK"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
import { generateMetadata as generateBaseMetadata } from "@/utils/generateMetadata"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export async function generateMetadata({ params }: PageArgs<LangParams>) {
|
||||
const accountPageRes = await serverClient().contentstack.accountPage.get()
|
||||
return generateBaseMetadata({
|
||||
params,
|
||||
pageTitle: accountPageRes?.accountPage?.title,
|
||||
})
|
||||
}
|
||||
|
||||
export default async function MyPages({
|
||||
params,
|
||||
}: PageArgs<LangParams & { path: string[] }>) {
|
||||
@@ -34,7 +43,6 @@ export default async function MyPages({
|
||||
<p>{formatMessage({ id: "No content published" })}</p>
|
||||
)}
|
||||
</main>
|
||||
|
||||
<TrackingSDK pageData={tracking} />
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user