mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
refactor: adjust the types
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Product } from '@commerce/types'
|
||||
import { getConfig, SaleorConfig } from '../api'
|
||||
import fetchAllProducts from '../api/utils/fetch-all-products'
|
||||
import { ProductEdge } from '../schema'
|
||||
import { ProductCountableEdge } from '../schema'
|
||||
import getAllProductsPathsQuery from '../utils/queries/get-all-products-paths-query'
|
||||
|
||||
type ProductPath = {
|
||||
@@ -31,7 +31,7 @@ const getAllProductPaths = async (options?: {
|
||||
})
|
||||
|
||||
return {
|
||||
products: products?.map(({ node: { handle } }: ProductEdge) => ({
|
||||
products: products?.map(({ node: { slug } }: ProductCountableEdge) => ({
|
||||
node: {
|
||||
path: `/${handle}`,
|
||||
},
|
||||
|
Reference in New Issue
Block a user