mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
fix types for normalize products
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { GraphQLFetcherResult } from '@commerce/api'
|
||||
import { getConfig, ReactionCommerceConfig } from '../api'
|
||||
import { CatalogItemEdge } from '../schema'
|
||||
import { CatalogItemEdge, CatalogItemProduct } from '../schema'
|
||||
import { catalogItemsQuery } from '../utils/queries'
|
||||
import { normalizeProduct } from '../utils/normalize'
|
||||
import { Product } from '@commerce/types'
|
||||
@@ -30,8 +30,8 @@ const getAllProducts = async (options: {
|
||||
})
|
||||
|
||||
const catalogItems =
|
||||
data.catalogItems?.edges?.map(({ node: p }: CatalogItemEdge) =>
|
||||
normalizeProduct(p)
|
||||
data.catalogItems?.edges?.map(({ node: itemProduct }: CatalogItemEdge) =>
|
||||
normalizeProduct(itemProduct as CatalogItemProduct)
|
||||
) ?? []
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user