mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Adding Modal Component and Login View
This commit is contained in:
@@ -19,10 +19,12 @@ export default function useCart<T>(
|
||||
swrOptions?: ConfigInterface<T | null>
|
||||
) {
|
||||
const { cartCookie } = useCommerce()
|
||||
|
||||
const fetcher: typeof fetcherFn = (options, input, fetch) => {
|
||||
input.cartId = Cookies.get(cartCookie)
|
||||
return fetcherFn(options, input, fetch)
|
||||
}
|
||||
|
||||
const response = useData(options, input, fetcher, swrOptions)
|
||||
|
||||
return Object.assign(response, { isEmpty: true }) as CartResponse<T>
|
||||
|
Reference in New Issue
Block a user