mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 23:16:59 +00:00
remove unused files
This commit is contained in:
parent
f427b763b8
commit
64677c2fe9
@ -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",
|
||||
|
@ -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
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user