mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
Updates
This commit is contained in:
@@ -25,14 +25,12 @@ const getAllPages = async (options?: {
|
||||
}): Promise<ReturnType> => {
|
||||
let { config, variables = { first: 250 } } = options ?? {}
|
||||
config = getConfig(config)
|
||||
|
||||
const { data } = await config.fetch(getAllPagesQuery, { variables })
|
||||
const edges = data.pages?.edges
|
||||
|
||||
const pages = edges?.map(
|
||||
({ node: { title: name, handle: url, ...node } }: PageEdge) => ({
|
||||
const pages = data.pages?.edges?.map(
|
||||
({ node: { title: name, handle, ...node } }: PageEdge) => ({
|
||||
...node,
|
||||
url,
|
||||
url: `/${handle}`,
|
||||
name,
|
||||
})
|
||||
)
|
||||
|
Reference in New Issue
Block a user