Improved Categories

This commit is contained in:
Bel Curcio 2021-05-28 18:42:01 -03:00
parent 5bc9d4d160
commit f1105c72c9

View File

@ -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]
> >