feat: fetch urls for language switcher from contentstack

This commit is contained in:
Christel Westerberg
2024-05-27 16:46:01 +02:00
parent f4c58ec3ee
commit 28efca98b9
15 changed files with 223 additions and 24 deletions

View File

@@ -70,7 +70,7 @@ export const validateHeaderConfigSchema = z.object({
edges: z.array(
z.object({
node: z.object({
description: z.string().optional(),
description: z.string().optional().nullable(),
dimension: z.object({
height: z.number(),
width: z.number(),
@@ -79,8 +79,8 @@ export const validateHeaderConfigSchema = z.object({
system: z.object({
uid: z.string(),
}),
title: z.string(),
url: z.string(),
title: z.string().nullable(),
url: z.string().nullable(),
}),
})
),

View File

@@ -35,7 +35,6 @@ export const configQueryRouter = router({
return validatedContactConfigConfig.data.all_contact_config.items[0]
}),
header: publicProcedure.query(async ({ ctx }) => {
console.log({ ctx })
const response = await request<HeaderDataRaw>(
GetCurrentHeader,
{ locale: ctx.lang },