From 47bd449fbe50a7b423db860ee6a34a7a3f7c3bb4 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sat, 23 Mar 2024 14:33:28 +0000
Subject: feature(web): Add dark mode support

---
 apps/web/lib/providers.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'apps/web/lib/providers.tsx')

diff --git a/apps/web/lib/providers.tsx b/apps/web/lib/providers.tsx
index ce667f8d..b700d0c1 100644
--- a/apps/web/lib/providers.tsx
+++ b/apps/web/lib/providers.tsx
@@ -2,6 +2,7 @@
 
 import type { Session } from "next-auth";
 import React, { useState } from "react";
+import { ThemeProvider } from "@/components/theme-provider";
 import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
 import { httpBatchLink, loggerLink } from "@trpc/client";
 import { SessionProvider } from "next-auth/react";
@@ -73,7 +74,14 @@ export default function Providers({
       <SessionProvider session={session}>
         <api.Provider client={trpcClient} queryClient={queryClient}>
           <QueryClientProvider client={queryClient}>
-            {children}
+            <ThemeProvider
+              attribute="class"
+              defaultTheme="system"
+              enableSystem
+              disableTransitionOnChange
+            >
+              {children}
+            </ThemeProvider>
           </QueryClientProvider>
         </api.Provider>
       </SessionProvider>
-- 
cgit v1.2.3-70-g09d2

