feat(SW-187): Footer data from contentstack
This commit is contained in:
10
server/routers/contentstack/base/utils.ts
Normal file
10
server/routers/contentstack/base/utils.ts
Normal 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,
|
||||
}))
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user