mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Fix build errors
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { SwellConfig } from '../api'
|
||||
|
||||
export type Category = {
|
||||
id: string
|
||||
entityId: string
|
||||
name: string
|
||||
slug: string
|
||||
path: string
|
||||
}
|
||||
|
||||
const getCategories = async (config: SwellConfig): Promise<Category[]> => {
|
||||
const data = await config.fetchSwell('categories', 'get')
|
||||
const data = await config.fetch('categories', 'get')
|
||||
return (
|
||||
data.results.map(({ id: entityId, name, slug }: Category) => ({
|
||||
data.results.map(({ id: entityId, name, slug }: any) => ({
|
||||
entityId,
|
||||
name,
|
||||
path: `/${slug}`,
|
||||
|
@@ -13,7 +13,7 @@ export type Brands = BrandEdge[]
|
||||
|
||||
const getVendors = async (config: SwellConfig) => {
|
||||
const vendors: [string] =
|
||||
(await config.fetchSwell('attributes', 'get', ['brand']))?.values ?? []
|
||||
(await config.fetch('attributes', 'get', ['brand']))?.values ?? []
|
||||
|
||||
return [...new Set(vendors)].map((v) => ({
|
||||
node: {
|
||||
|
@@ -1,11 +1,6 @@
|
||||
import { Product, Customer } from '@commerce/types'
|
||||
|
||||
import {
|
||||
Checkout,
|
||||
CheckoutLineItemEdge,
|
||||
MoneyV2,
|
||||
ProductOption,
|
||||
} from '../schema'
|
||||
import { MoneyV2, ProductOption } from '../schema'
|
||||
|
||||
import type {
|
||||
Cart,
|
||||
|
Reference in New Issue
Block a user