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 { SaleorConfig } from '../api'
|
||||||
import { CollectionEdge } from '../schema'
|
import { Collection, CollectionCountableEdge } from '../schema'
|
||||||
import getSiteCollectionsQuery from './queries/get-all-collections-query'
|
import { getSiteCollectionsQuery } from './queries/'
|
||||||
|
|
||||||
export type Category = {
|
export type Category = {
|
||||||
entityId: string
|
entityId: string
|
||||||
@ -17,7 +17,7 @@ const getCategories = async (config: SaleorConfig): Promise<Category[]> => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
data.collections?.edges?.map(
|
data.collections?.edges?.map(
|
||||||
({ node: { id: entityId, name, slug } }: CollectionEdge) => ({
|
({ node: { id: entityId, name, slug } }: CollectionCountableEdge) => ({
|
||||||
entityId,
|
entityId,
|
||||||
name,
|
name,
|
||||||
path: `/${slug}`,
|
path: `/${slug}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user