fix: Import data

This commit is contained in:
Alessandro Casazza 2021-10-14 18:39:43 +02:00
parent 93d5fc0220
commit 703446013b
No known key found for this signature in database
GPG Key ID: 3AF41B06C6495D3D

View File

@ -1,6 +1,6 @@
import { HookFetcher } from '@commerce/utils/types'
import type { Product } from '@commerce/types/product'
import { products } from '../data.json'
import data from '../data.json'
import { useCustomer } from '@framework/customer'
const defaultOpts = {}
@ -40,7 +40,7 @@ export function extendHook(
if (getWishlist && customer?.email) {
const wishlist = JSON.parse(getWishlist)
const items = wishlist.map((wishlist: string) => {
const [product] = products.filter((p) => p.id === wishlist) as any
const [product] = data.products.filter((p) => p.id === wishlist) as any
return {
variant_id: wishlist,
product_id: wishlist,