From d3d45e1b2a24c2894243fb0b7e9762ce429e8858 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 15 Oct 2020 18:05:13 -0300 Subject: [PATCH] UI Provider --- lib/commerce/cart/use-cart.tsx | 2 +- pages/_app.tsx | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/commerce/cart/use-cart.tsx b/lib/commerce/cart/use-cart.tsx index b65228553..bd1af710c 100644 --- a/lib/commerce/cart/use-cart.tsx +++ b/lib/commerce/cart/use-cart.tsx @@ -18,7 +18,7 @@ export default function useCart( fetcherFn: HookFetcher, swrOptions?: ConfigInterface ) { - const { cartCookie = '' } = useCommerce() | {} + const { cartCookie } = useCommerce() const fetcher: typeof fetcherFn = (options, input, fetch) => { input.cartId = Cookies.get(cartCookie) return fetcherFn(options, input, fetch) diff --git a/pages/_app.tsx b/pages/_app.tsx index 3d8dfc37c..699cc901c 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -14,15 +14,13 @@ export default function MyApp({ Component, pageProps }: AppProps) { const Layout = (Component as any).Layout || Noop return ( - <> + - - - - - - - - + + + + + + ) }