remove unused files

This commit is contained in:
Dom Sip 2022-03-24 10:44:09 +00:00
parent f427b763b8
commit 64677c2fe9
3 changed files with 1 additions and 29 deletions

View File

@ -51,8 +51,7 @@
"dependencies": {
"@vercel/commerce": "^0.0.1",
"@vercel/fetch": "^6.1.1",
"lodash.debounce": "^4.0.8",
"immutability-helper": "^3.1.1"
"lodash.debounce": "^4.0.8"
},
"peerDependencies": {
"next": "^12",

View File

@ -1,13 +0,0 @@
import update, { Context } from 'immutability-helper'
const c = new Context()
c.extend('$auto', function (value, object) {
return object ? c.update(object, value) : c.update({}, value)
})
c.extend('$autoArray', function (value, object) {
return object ? c.update(object, value) : c.update([], value)
})
export default c.update

View File

@ -1,21 +1,7 @@
import update from './immutability'
import getSlug from './get-slug'
import type { PrCategory, CustomerAccountInput, Document } from '../../schema'
import { Page } from '../types/page';
import { Customer } from '../types/customer'
function normalizeProductOption(productOption: any) {
const {
node: { entityId, values: { edges = [] } = {}, ...rest },
} = productOption
return {
id: entityId,
values: edges?.map(({ node }: any) => node),
...rest,
}
}
export function normalizeProduct(productNode: any, config: any): any {
const product = {
id: productNode.productCode,