mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Updated paths to useCart
This commit is contained in:
@@ -2,7 +2,7 @@ import { useCallback } from 'react'
|
||||
import { HookFetcher } from '@lib/commerce/utils/types'
|
||||
import useCartAddItem from '@lib/commerce/cart/use-add-item'
|
||||
import type { ItemBody, AddItemBody } from '../api/cart'
|
||||
import { Cart, useCart } from '.'
|
||||
import useCart, { Cart } from './use-cart'
|
||||
|
||||
const defaultOpts = {
|
||||
url: '/api/bigcommerce/cart',
|
||||
|
@@ -46,4 +46,4 @@ export function extendHook(customFetcher: typeof fetcher) {
|
||||
return useCart
|
||||
}
|
||||
|
||||
export const useCart = extendHook(fetcher)
|
||||
export default extendHook(fetcher)
|
@@ -2,7 +2,7 @@ import { useCallback } from 'react'
|
||||
import { HookFetcher } from '@lib/commerce/utils/types'
|
||||
import useCartRemoveItem from '@lib/commerce/cart/use-remove-item'
|
||||
import type { RemoveItemBody } from '../api/cart'
|
||||
import { Cart, useCart } from '.'
|
||||
import useCart, { Cart } from './use-cart'
|
||||
|
||||
const defaultOpts = {
|
||||
url: '/api/bigcommerce/cart',
|
||||
|
@@ -4,7 +4,7 @@ import { HookFetcher } from '@lib/commerce/utils/types'
|
||||
import useCartUpdateItem from '@lib/commerce/cart/use-update-item'
|
||||
import type { ItemBody, UpdateItemBody } from '../api/cart'
|
||||
import { fetcher as removeFetcher } from './use-remove-item'
|
||||
import { Cart, useCart } from '.'
|
||||
import useCart, { Cart } from './use-cart'
|
||||
|
||||
const defaultOpts = {
|
||||
url: '/api/bigcommerce/cart',
|
||||
|
Reference in New Issue
Block a user