feat(SW-285): Add support for sidebar
This commit is contained in:
@@ -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",
|
||||
}
|
||||
|
||||
21
types/components/content/sidebar.ts
Normal file
21
types/components/content/sidebar.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user