11 lines
271 B
TypeScript
11 lines
271 B
TypeScript
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,
|
|
}))
|
|
)
|
|
}
|