fix: fixed theme blinking on reload

This commit is contained in:
2025-07-22 18:48:01 +04:00
parent 6b728f3780
commit d844e82785
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ export default function RootLayout({ children }: Props) {
lang="ru"
{...mantineHtmlProps}>
<head>
<ColorSchemeScript />
<ColorSchemeScript defaultColorScheme={"auto"} />
<link
rel="shortcut icon"
href="/favicon.svg"
@ -43,7 +43,7 @@ export default function RootLayout({ children }: Props) {
<body>
<MantineProvider
theme={theme}
defaultColorScheme={"dark"}>
defaultColorScheme={"auto"}>
<Header />
{children}
<Footer />

View File

@ -11,7 +11,7 @@ import style from "./ActionToggle.module.css";
export function ColorSchemeToggle() {
const { setColorScheme } = useMantineColorScheme();
const computedColorScheme = useComputedColorScheme("light", {
const computedColorScheme = useComputedColorScheme(undefined, {
getInitialValueInEffect: true,
});