mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 07:26:59 +00:00
fix: Import data
This commit is contained in:
parent
93d5fc0220
commit
703446013b
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user