feat(SW-187): Footer data from contentstack

This commit is contained in:
Pontus Dreij
2024-08-28 08:30:45 +02:00
parent 2fcbaa62e4
commit da51bd88fe
14 changed files with 370 additions and 21 deletions

View File

@@ -0,0 +1,10 @@
import type { FooterLinkItem } from "./output"
export function transformPageConnectionLinks(links: FooterLinkItem[]) {
return links.flatMap((link) =>
link.pageConnection?.edges.map((edge) => ({
title: edge.node.title,
url: edge.node.url,
}))
)
}