From 0f349e174949c8d986df73dd9ec0d1b8b8c3d757 Mon Sep 17 00:00:00 2001
From: Owen-Morgan825 <owen.morgan092@gmail.com>
Date: Tue, 14 Jan 2025 20:26:07 -0500
Subject: [PATCH 1/2] Temp fix entire page disapearing when theme buttons
 double-clicked

---
 src/components/ThemeProvider.tsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/components/ThemeProvider.tsx b/src/components/ThemeProvider.tsx
index feffa65a..fa3c50bb 100644
--- a/src/components/ThemeProvider.tsx
+++ b/src/components/ThemeProvider.tsx
@@ -46,7 +46,6 @@ export function ThemeProvider({
 
   useEffect(() => {
     const root = window.document.documentElement;
-
     root.classList.remove('light', 'dark');
 
     if (theme === 'system') {
@@ -58,8 +57,13 @@ export function ThemeProvider({
       root.classList.add(systemTheme);
       return;
     }
-    setResolvedTheme(theme);
-    root.classList.add(theme);
+    
+    if(theme !== '') {
+      setResolvedTheme(theme);
+      root.classList.add(theme);
+    }
+    
+    
   }, [theme]);
 
   const value = {

From 34fc887849ecf93df9b1c07c8d938e02a47bae45 Mon Sep 17 00:00:00 2001
From: Owen-Morgan825 <owen.morgan092@gmail.com>
Date: Thu, 16 Jan 2025 18:04:37 -0500
Subject: [PATCH 2/2] Make "" a valid value of things of type Theme

---
 src/components/ThemeProvider.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/ThemeProvider.tsx b/src/components/ThemeProvider.tsx
index fa3c50bb..7e21efa3 100644
--- a/src/components/ThemeProvider.tsx
+++ b/src/components/ThemeProvider.tsx
@@ -2,7 +2,7 @@ import { useQRScoutState } from '@/store/store';
 import { setColorScheme } from '@/util/theme';
 import { createContext, useContext, useEffect, useState } from 'react';
 
-type Theme = 'dark' | 'light' | 'system';
+type Theme = 'dark' | 'light' | 'system' | '';
 
 type ThemeProviderProps = {
   children: React.ReactNode;