feat(SW-285): Add support for sidebar

This commit is contained in:
Chuma McPhoy
2024-09-02 22:43:08 +02:00
parent 60636d8cbe
commit a444746ccb
14 changed files with 594 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
import { JoinLoyaltyContact } from "@/server/routers/contentstack/contentPage/output"
import { Typename } from "@/types/requests/utils/typename"
export enum ContentBlocksTypenameEnum {
ContentPageBlocksContent = "ContentPageBlocksContent",
ContentPageBlocksShortcuts = "ContentPageBlocksShortcuts",
@@ -15,3 +19,24 @@ export enum DynamicContentComponentEnum {
how_it_works = "how_it_works",
overview_table = "overview_table",
}
export enum SidebarTypenameEnum {
ContentPageSidebarJoinLoyaltyContact = "ContentPageSidebarJoinLoyaltyContact",
ContentPageSidebarContent = "ContentPageSidebarContent",
ContentPageSidebarDynamicContent = "ContentPageSidebarDynamicContent",
}
export type SidebarTypename = keyof typeof SidebarTypenameEnum
export enum JoinLoyaltyContactTypenameEnum {
ContentPageSidebarJoinLoyaltyContactBlockContactContact = "ContentPageSidebarJoinLoyaltyContactBlockContactContact",
}
export type JoinLoyaltyContactContact = Typename<
JoinLoyaltyContact["join_loyalty_contact"],
JoinLoyaltyContactTypenameEnum.ContentPageSidebarJoinLoyaltyContactBlockContactContact
>
export enum SidebarDynamicComponentEnum {
my_pages_navigation = "my_pages_navigation",
}

View File

@@ -0,0 +1,21 @@
import { ContactFields } from "@/server/routers/contentstack/base/output"
import {
JoinLoyaltyContact,
Sidebar,
} from "@/server/routers/contentstack/contentPage/output"
export type SidebarProps = {
blocks: Sidebar[]
}
export type JoinLoyaltyContactProps = {
block: JoinLoyaltyContact["join_loyalty_contact"]
}
export type ContactProps = {
contactBlock: JoinLoyaltyContact["join_loyalty_contact"]["contact"]
}
export type ContactRowProps = {
contact: ContactFields
}