add theme toggle button
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-04-15 13:10:33 +01:00
parent f8d5e45673
commit b30b8503f9
3 changed files with 53 additions and 56 deletions
+6 -9
View File
@@ -38,16 +38,13 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
// Remova o style={{ colorScheme: 'light' }} daqui,
// pois o Next.js tem dificuldade em hidratar estilos inline no <html>
<html lang="pt" style={{ colorScheme: 'light' }} className={`${inter.variable} light h-full antialiased`} suppressHydrationWarning>
<body className={`min-h-full flex flex-col bg-[#f5f5f7] text-neutral-900 ${inter.className}`}>
// 1. We remove "light" from className so ThemeProvider can inject it
// 2. We remove style={{ colorScheme: 'light' }}
<html lang="pt" className={`${inter.variable} h-full antialiased`} suppressHydrationWarning>
<body className={`min-h-full flex flex-col bg-[#f5f5f7] text-neutral-900 dark:bg-black dark:text-white ${inter.className}`}>
<GoogleOAuthProvider clientId="618391854803-gtdbtnf5t78stsmd1724s8c456tfq4lr.apps.googleusercontent.com">
<ThemeProvider
attribute="class"
defaultTheme="light"
enableSystem={false}
>
{/* Ensure attribute="class" is set here */}
<ThemeProvider attribute="class" defaultTheme="light" enableSystem>
{children}
</ThemeProvider>
</GoogleOAuthProvider>