Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix theme toggle for marketing site to default to dark if no initial configuration

Joshen Limce43093c538e
diff --git a/www/components/Providers/index.tsx b/www/components/Providers/index.tsx
index 712d1c91d65..ab023562c17 100644
--- a/www/components/Providers/index.tsx
+++ b/www/components/Providers/index.tsx
@@ -21,7 +21,8 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => {
useEffect(() => {
const key = localStorage.getItem('supabaseDarkMode')
- setIsDarkMode(key === 'true')
+ // Default to dark mode if no preference config
+ setIsDarkMode(!key || key === 'true')
}, [])
const toggleTheme = () => {