Revert files

This commit is contained in:
cond0r
2021-09-23 19:16:06 +03:00
parent 0ea2490f2a
commit 5c50a1aff0
2 changed files with 14 additions and 16 deletions

View File

@@ -29,18 +29,16 @@ export const handler: MutationHook<AddItemHook> = {
return data return data
}, },
useHook: useHook: ({ fetch }) => () => {
({ fetch }) => const { mutate } = useCart()
() => {
const { mutate } = useCart()
return useCallback( return useCallback(
async function addItem(input) { async function addItem(input) {
const data = await fetch({ input }) const data = await fetch({ input })
await mutate(data, false) await mutate(data, false)
return data return data
}, },
[fetch, mutate] [fetch, mutate]
) )
}, },
} }

View File

@@ -23,8 +23,8 @@
"@components/*": ["components/*"], "@components/*": ["components/*"],
"@commerce": ["framework/commerce"], "@commerce": ["framework/commerce"],
"@commerce/*": ["framework/commerce/*"], "@commerce/*": ["framework/commerce/*"],
"@framework": ["framework/shopify"], "@framework": ["framework/local"],
"@framework/*": ["framework/shopify/*"] "@framework/*": ["framework/local/*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],