feat: add blocks for loyalty page

This commit is contained in:
Christel Westerberg
2024-04-23 16:54:34 +02:00
parent fc0e5aed02
commit 2ddabf1e50
22 changed files with 418 additions and 109 deletions

View File

@@ -0,0 +1,47 @@
import { Embeds } from "@/types/requests/embeds"
import { PageLink } from "@/types/requests/myPages/navigation"
import { Edges } from "@/types/requests/utils/edges"
import { RTEDocument } from "@/types/rte/node"
export enum LoyaltyComponentEnum {
loyalty_levels = "loyalty_levels",
how_it_works = "how_it_works",
overview_table = "overview_table",
}
export type LoyaltyComponent = keyof typeof LoyaltyComponentEnum
export type DynamicContentBlock = {
dynamic_content: {
title: string
preamble?: string
component: LoyaltyComponent
link: {
text?: string
page: Edges<PageLink>
}
}
}
export type DynamicContentProps = {
dynamicContent: DynamicContentBlock["dynamic_content"]
}
export type CardGrid = {
card_grid: {
heading: string
preamble: string
cards: {
referenceConnection: Edges<PageLink>
heading: string
preamble: string
}
}
}
export type Content = {
content: {
embedded_itemsConnection: Edges<Embeds>
json: RTEDocument
}
}

View File

@@ -0,0 +1,20 @@
import { ContactFields } from "@/types/requests/contactConfig"
import { Embeds } from "@/types/requests/embeds"
import { JoinLoyaltyContactEnum } from "@/types/requests/loyaltyPage"
import { Edges } from "@/types/requests/utils/edges"
import { RTEDocument } from "@/types/rte/node"
export type SidebarContent = {
content: {
embedded_itemsConnection: Edges<Embeds>
json: RTEDocument
}
}
export type Contact = {
contact: ContactFields
}
export type ContactProps = {
contactBlock: JoinLoyaltyContactEnum[]
}