mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 21:51:21 +00:00
saleor: fix the type for collection
This commit is contained in:
parent
2fe2c71fc3
commit
f4b66f2132
@ -1,6 +1,6 @@
|
||||
import { SaleorConfig } from '../api'
|
||||
import { CollectionEdge } from '../schema'
|
||||
import getSiteCollectionsQuery from './queries/get-all-collections-query'
|
||||
import { Collection, CollectionCountableEdge } from '../schema'
|
||||
import { getSiteCollectionsQuery } from './queries/'
|
||||
|
||||
export type Category = {
|
||||
entityId: string
|
||||
@ -17,7 +17,7 @@ const getCategories = async (config: SaleorConfig): Promise<Category[]> => {
|
||||
|
||||
return (
|
||||
data.collections?.edges?.map(
|
||||
({ node: { id: entityId, name, slug } }: CollectionEdge) => ({
|
||||
({ node: { id: entityId, name, slug } }: CollectionCountableEdge) => ({
|
||||
entityId,
|
||||
name,
|
||||
path: `/${slug}`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user