feat: sync design of header with current web

This commit is contained in:
Christel Westerberg
2024-05-29 15:36:19 +02:00
parent 88dde3def4
commit 0ec6d58d6a
22 changed files with 122 additions and 225 deletions
+5 -2
View File
@@ -1,10 +1,13 @@
import type { Image } from "@/types/image"
import type { HeaderLink, TopMenuHeaderLink } from "@/types/requests/header"
import type {
CurrentHeaderLink,
TopMenuHeaderLink,
} from "@/types/requests/currentHeader"
export type MainMenuProps = {
frontpageLinkText: string
homeHref: string
links: HeaderLink[]
links: CurrentHeaderLink[]
logo: Image
topMenuMobileLinks: TopMenuHeaderLink[]
languageSwitcher: React.ReactNode
+2 -1
View File
@@ -1,8 +1,9 @@
import type { TopMenuHeaderLink } from "@/types/requests/header"
import type { TopMenuHeaderLink } from "@/types/requests/currentHeader"
export type TopMenuProps = {
frontpageLinkText: string
homeHref: string
links: TopMenuHeaderLink[]
languageSwitcher: React.ReactNode
lang: string
}
+2 -2
View File
@@ -7,7 +7,7 @@ export type CurrentHeaderLink = {
title: string
}
export type TopMenuCurrentHeaderLink = {
export type TopMenuHeaderLink = {
link: {
href: string
title: string
@@ -21,7 +21,7 @@ export type CurrentHeaderLinks = {
}
export type TopMenuCurrentHeaderLinks = {
links: TopMenuCurrentHeaderLink[]
links: TopMenuHeaderLink[]
}
export type CurrentHeader = {
-35
View File
@@ -1,35 +0,0 @@
import type { Image } from "../image"
import type { EdgesWithTotalCount } from "./utils/edges"
export type HeaderLink = {
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: EdgesWithTotalCount<Image>
menu: HeaderLinks
top_menu: TopMenuHeaderLinks
}[]
}
}