feat: add blocks for loyalty page
This commit is contained in:
47
types/components/loyalty/blocks.ts
Normal file
47
types/components/loyalty/blocks.ts
Normal 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
|
||||
}
|
||||
}
|
||||
20
types/components/loyalty/sidebar.ts
Normal file
20
types/components/loyalty/sidebar.ts
Normal 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[]
|
||||
}
|
||||
Reference in New Issue
Block a user