jan/web-client/app/_helpers/ThemeWrapper.tsx
NamH d55a83888b
refactor: replacing mobx with jotai (#160)
* refactor: replacing mobx with jotai

Signed-off-by: James <james@jan.ai>
Co-authored-by: James <james@jan.ai>
Co-authored-by: Louis <louis@jan.ai>
2023-09-13 21:33:53 -07:00

16 lines
437 B
TypeScript

"use client";
import { ThemeProvider } from "next-themes";
import { ReactNode } from "react";
type Props = {
children: ReactNode;
};
// consider to use next-themes or not. This caused the error Warning: Extra attributes from the server: class,style at html after hydration
export const ThemeWrapper: React.FC<Props> = ({ children }) => (
<ThemeProvider enableSystem={false} attribute="class">
{children}
</ThemeProvider>
);