fixed hydration error when changing theme and added dynamic default avatar

This commit is contained in:
Polaris
2024-07-24 23:25:01 -04:00
parent 8df0064100
commit 0a2eac63b6
7 changed files with 171 additions and 86 deletions

View File

@ -2,7 +2,7 @@ import type { Metadata } from "next";
import { GeistSans } from "geist/font/sans";
import { Toaster } from "@/components/ui/toaster";
import "./globals.css";
import { ThemeProvider } from "./theme-provider";
import Providers from "./theme-provider";
export const metadata: Metadata = {
title: "Daphnis",
description: "Artemis score viewer",
@ -16,14 +16,9 @@ export default function RootLayout({
return (
<html lang="en" className={GeistSans.className}>
<body className={GeistSans.className}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<Providers>
<main className="">{children} </main>
</ThemeProvider>
</Providers>
<Toaster />
</body>
</html>