Skip to content

Commit

Permalink
Fix: Creating New Product (OriginProtocol#972)
Browse files Browse the repository at this point in the history
* fix: create new product

`fetchProductStock` is no longer a cached function, no need to clear cache

* ugh linter :(
  • Loading branch information
nouex authored Feb 17, 2022
1 parent 9793ec2 commit f9f3860
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions shop/src/pages/admin/products/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { formInput, formFeedback } from 'utils/formHelpers'
import { generateVariants } from 'utils/generateVariants'

import fetchProduct from 'data/fetchProduct'
import fetchProductStock from 'data/fetchProductStock'

import Link from 'components/Link'
import Redirect from 'components/Redirect'
Expand Down Expand Up @@ -329,7 +328,6 @@ const EditProduct = () => {

// Clear memoize cache for existing product
fetchProduct.cache.delete(`${config.dataSrc}-${product.id}`)
fetchProductStock.cache.clear()

dispatch({
type: 'toast',
Expand Down

0 comments on commit f9f3860

Please sign in to comment.