mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 06:52:24 +00:00
single exec of theme setter
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { ColorService } from "#/utils/colors";
|
||||
import { ThemeProvider, useTheme } from "next-themes";
|
||||
import { useEffect } from "react";
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
@@ -12,9 +10,10 @@ export function LayoutProviders({ children }: Props) {
|
||||
const { resolvedTheme } = useTheme();
|
||||
const isDark = resolvedTheme && resolvedTheme === "dark";
|
||||
|
||||
useEffect(() => {
|
||||
new ColorService(document);
|
||||
});
|
||||
// useEffect(() => {
|
||||
// console.log("layoutproviders useeffect");
|
||||
// setTheme(document);
|
||||
// });
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
|
||||
Reference in New Issue
Block a user