feat(SW-186): changed name existing header query to currentHeader query and all related types

This commit is contained in:
Erik Tiekstra
2024-08-26 13:58:33 +02:00
parent 0d27f753ed
commit 1aff87f1a1
3 changed files with 43 additions and 37 deletions
+10 -6
View File
@@ -62,7 +62,7 @@ export type ContactFields = {
footnote: string | null
}
export const validateHeaderConfigSchema = z.object({
export const validateCurrentHeaderConfigSchema = z.object({
all_current_header: z.object({
items: z.array(
z.object({
@@ -111,16 +111,18 @@ export const validateHeaderConfigSchema = z.object({
}),
})
export type HeaderDataRaw = z.infer<typeof validateHeaderConfigSchema>
export type CurrentHeaderDataRaw = z.infer<
typeof validateCurrentHeaderConfigSchema
>
export type HeaderData = Omit<
HeaderDataRaw["all_current_header"]["items"][0],
export type CurrentHeaderData = Omit<
CurrentHeaderDataRaw["all_current_header"]["items"][0],
"logoConnection"
> & {
logo: Image
}
const validateHeaderRefConfigSchema = z.object({
const validateCurrentHeaderRefConfigSchema = z.object({
all_current_header: z.object({
items: z.array(
z.object({
@@ -133,7 +135,9 @@ const validateHeaderRefConfigSchema = z.object({
}),
})
export type HeaderRefDataRaw = z.infer<typeof validateHeaderRefConfigSchema>
export type CurrentHeaderRefDataRaw = z.infer<
typeof validateCurrentHeaderRefConfigSchema
>
const validateAppDownload = z.object({
href: z.string(),