mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 05:31:22 +00:00
Improved Categories
This commit is contained in:
parent
5bc9d4d160
commit
f1105c72c9
@ -5,7 +5,6 @@ import { BigcommerceConfig, getConfig } from '../api'
|
|||||||
import { categoryTreeItemFragment } from '../api/fragments/category-tree'
|
import { categoryTreeItemFragment } from '../api/fragments/category-tree'
|
||||||
import { Category } from '@commerce/types'
|
import { Category } from '@commerce/types'
|
||||||
import getSlug from '@lib/get-slug'
|
import getSlug from '@lib/get-slug'
|
||||||
import { CategoryTreeItem } from '@framework/schema'
|
|
||||||
|
|
||||||
// Get 3 levels of categories
|
// Get 3 levels of categories
|
||||||
export const getSiteInfoQuery = /* GraphQL */ `
|
export const getSiteInfoQuery = /* GraphQL */ `
|
||||||
@ -51,8 +50,6 @@ export type CategoriesTree = NonNullable<
|
|||||||
GetSiteInfoQuery['site']['categoryTree']
|
GetSiteInfoQuery['site']['categoryTree']
|
||||||
>
|
>
|
||||||
|
|
||||||
export type CategoryItem = Pick<CategoryTreeItem, 'entityId' | 'name' | 'path'>
|
|
||||||
|
|
||||||
export type BrandEdge = NonNullable<
|
export type BrandEdge = NonNullable<
|
||||||
NonNullable<GetSiteInfoQuery['site']['brands']['edges']>[0]
|
NonNullable<GetSiteInfoQuery['site']['brands']['edges']>[0]
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user