feat(SW-266): Replacing static metadata with data from Contentstack on Loyalty pages and Account Pages

This commit is contained in:
Pontus Dreij
2024-08-19 13:03:46 +02:00
parent f561ca750c
commit c730fa7035
16 changed files with 316 additions and 8 deletions
@@ -190,6 +190,7 @@ const loyaltyPageSidebarItem = z.discriminatedUnion("__typename", [
])
export const validateLoyaltyPageSchema = z.object({
title: z.string(),
heading: z.string().nullable(),
blocks: z.array(loyaltyPageBlockItem).nullable(),
sidebar: z.array(loyaltyPageSidebarItem).nullable(),
@@ -209,6 +209,7 @@ export const loyaltyPageQueryRouter = router({
: null
const loyaltyPage = {
title: response.data.loyalty_page.title,
heading: response.data.loyalty_page.heading,
system: response.data.loyalty_page.system,
blocks,