Minor changes

This commit is contained in:
Luis Alvarez
2021-01-25 15:03:59 -05:00
parent 905d0324f0
commit 1588fcf6bb
5 changed files with 7 additions and 14 deletions

View File

@@ -10,9 +10,7 @@ const defaultOpts = {
method: 'GET',
}
type UseCartResponse = BigcommerceCart & Cart
export const fetcher: HookFetcher<UseCartResponse | null, CartInput> = (
export const fetcher: HookFetcher<BigcommerceCart | null, CartInput> = (
options,
{ cartId },
fetch
@@ -22,7 +20,7 @@ export const fetcher: HookFetcher<UseCartResponse | null, CartInput> = (
export function extendHook(
customFetcher: typeof fetcher,
swrOptions?: SwrOptions<UseCartResponse | null, CartInput>
swrOptions?: SwrOptions<BigcommerceCart | null, CartInput>
) {
const useCart = () => {
const response = useCommerceCart(defaultOpts, [], customFetcher, {