feat(WEB-93): add Header to CMS and render it in Next
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import type { Lang } from "@/types/lang"
|
||||
import type { GetCurrentBlockPageData } from "@/types/requests/currentBlockPage"
|
||||
|
||||
export type ContentPageProps = {
|
||||
data: GetCurrentBlockPageData
|
||||
uri: string
|
||||
lang: Lang
|
||||
}
|
||||
|
||||
10
types/components/current/header/mainMenu.ts
Normal file
10
types/components/current/header/mainMenu.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { HeaderLink, TopMenuHeaderLink } from "@/types/requests/header"
|
||||
import type { Image } from "@/types/image"
|
||||
|
||||
export type MainMenuProps = {
|
||||
frontpageLinkText: string
|
||||
homeHref: string
|
||||
links: HeaderLink[]
|
||||
logo: Image
|
||||
topMenuMobileLinks: TopMenuHeaderLink[]
|
||||
}
|
||||
7
types/components/current/header/topMenu.ts
Normal file
7
types/components/current/header/topMenu.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { TopMenuHeaderLink } from "@/types/requests/header"
|
||||
|
||||
export type TopMenuProps = {
|
||||
frontpageLinkText: string
|
||||
homeHref: string
|
||||
links: TopMenuHeaderLink[]
|
||||
}
|
||||
@@ -29,6 +29,10 @@ interface SharedBreadcrumb {
|
||||
breadcrumbs: {
|
||||
title?: string
|
||||
} | null
|
||||
system: {
|
||||
locale: string
|
||||
uid: string
|
||||
}
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
|
||||
37
types/requests/header.ts
Normal file
37
types/requests/header.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { Edges } from "./utils/edges"
|
||||
import type { Image } from "../image"
|
||||
|
||||
export type HeaderLink = {
|
||||
link: {
|
||||
href: string
|
||||
title: string
|
||||
}
|
||||
}
|
||||
|
||||
export type TopMenuHeaderLink = {
|
||||
link: {
|
||||
href: string
|
||||
title: string
|
||||
}
|
||||
show_on_mobile: boolean
|
||||
sort_order_mobile: number
|
||||
}
|
||||
|
||||
export type HeaderLinks = {
|
||||
links: HeaderLink[]
|
||||
}
|
||||
|
||||
export type TopMenuHeaderLinks = {
|
||||
links: TopMenuHeaderLink[]
|
||||
}
|
||||
|
||||
export type HeaderQueryData = {
|
||||
all_header: {
|
||||
items: {
|
||||
frontpage_link_text: string
|
||||
logoConnection: Edges<Image>
|
||||
menu: HeaderLinks
|
||||
top_menu: TopMenuHeaderLinks
|
||||
}[]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user