From 616e9292cd1db6bbc0cd28208e5403dd667152b9 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 27 Sep 2023 14:05:15 +0700
Subject: Update with chakra UI theme

---
 src/pages/_app.jsx | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

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

diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx
index d5b59486..afebc293 100644
--- a/src/pages/_app.jsx
+++ b/src/pages/_app.jsx
@@ -1,6 +1,5 @@
 import '../styles/globals.css'
 import 'react-loading-skeleton/dist/skeleton.css'
-import '@fontsource/inter'
 
 import NextProgress from 'next-progress'
 import { useRouter, Router } from 'next/router'
@@ -8,19 +7,16 @@ import { AnimatePresence, motion } from 'framer-motion'
 import { Toaster } from 'react-hot-toast'
 import { QueryClient, QueryClientProvider } from 'react-query'
 import useDevice from '@/core/hooks/useDevice'
-import { createContext, useEffect, useState } from 'react'
+import { useEffect, useState } from 'react'
 import LogoSpinner from '@/core/components/elements/Spinner/LogoSpinner'
 import { SessionProvider } from 'next-auth/react'
 import { ProductProvider } from '@/contexts/ProductContext'
 import { ProductCartProvider } from '@/contexts/ProductCartContext'
+import { ChakraProvider } from '@chakra-ui/react'
+import theme from '../../chakra.theme'
 
 const queryClient = new QueryClient()
 
-export const AuthContext = createContext({
-  authenticated: false,
-  setAuthenticated: (auth) => {}
-})
-
 function MyApp({ Component, pageProps: { session, ...pageProps } }) {
   const router = useRouter()
   const { isMobile } = useDevice()
@@ -86,7 +82,9 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }) {
       <QueryClientProvider client={queryClient}>
         <ProductProvider>
           <ProductCartProvider>
-            <Component {...pageProps} key={router.asPath} />
+            <ChakraProvider theme={theme}>
+              <Component {...pageProps} key={router.asPath} />
+            </ChakraProvider>
           </ProductCartProvider>
         </ProductProvider>
       </QueryClientProvider>
-- 
cgit v1.2.3

