feat(SW-187): Added social media data and copyright label

This commit is contained in:
Pontus Dreij
2024-09-05 09:34:02 +02:00
parent 2c37bbad55
commit c033f776b6
17 changed files with 144 additions and 91 deletions

View File

@@ -309,6 +309,14 @@ export const validateFooterConfigSchema = z.object({
links: z.array(validateLinkItem),
})
),
social_media: z.object({
links: z.array(
z.object({
type: z.string(),
href: validateExternalLink,
})
),
}),
})
),
}),

View File

@@ -440,6 +440,7 @@ export const baseQueryRouter = router({
mainLinks: mainLinks,
appDownloads: validatedFooterData.app_downloads,
secondaryLinks: secondaryLinks,
socialMedia: validatedFooterData.social_media,
}
}),
})

View File

@@ -9,6 +9,7 @@ export function transformPageConnectionLinks(links: FooterLinkItem[]) {
title: edge.node.title || "",
url: edge.node.url || "",
openInNewTab: link.open_in_new_tab,
isExternal: false,
}))
} else if (link.link) {
return [
@@ -16,6 +17,7 @@ export function transformPageConnectionLinks(links: FooterLinkItem[]) {
title: link.link.title,
url: link.link.href,
openInNewTab: link.open_in_new_tab,
isExternal: true,
},
]
}