From f90ec98c509fad7146c169d8d762b4c847d07af8 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 15 Sep 2023 09:15:54 +0700
Subject: Add product context provider

---
 src/pages/_app.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/pages/_app.jsx')

diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx
index 7f23b94b..ef737794 100644
--- a/src/pages/_app.jsx
+++ b/src/pages/_app.jsx
@@ -10,6 +10,7 @@ import { createContext, useContext, useEffect, useState } from 'react'
 import LogoSpinner from '@/core/components/elements/Spinner/LogoSpinner'
 import { SessionProvider } from 'next-auth/react'
 import { getAuth } from '@/core/utils/auth'
+import { ProductProvider } from '@/contexts/ProductContext'
 
 const queryClient = new QueryClient()
 
@@ -93,7 +94,9 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }) {
             initial={false}
             onExitComplete={() => window.scrollTo(0, 0)}
           >
-            {!animateLoader && <Component {...pageProps} key={router.asPath} />}
+            <ProductProvider>
+              {!animateLoader && <Component {...pageProps} key={router.asPath} />}
+            </ProductProvider>
           </AnimatePresence>
         </QueryClientProvider>
       </SessionProvider>
-- 
cgit v1.2.3

