Files
nextjs-elysia-allaos/src/components/layout/providers.tsx
2026-04-17 11:10:08 +07:00

24 lines
555 B
TypeScript

"use client";
import { useTheme } from "next-themes";
import React from "react";
import { ActiveThemeProvider } from "../active-theme";
export default function Providers({
activeThemeValue,
children,
}: {
activeThemeValue: string;
children: React.ReactNode;
}) {
// we need the resolvedTheme value to set the baseTheme for clerk based on the dark or light theme
const { resolvedTheme } = useTheme();
return (
<>
<ActiveThemeProvider initialTheme={activeThemeValue}>
{children}
</ActiveThemeProvider>
</>
);
}