This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
web-client/app/providers.tsx
Seiwy ebbefc03d9
Some checks failed
/ docker (pull_request) Failing after 4m3s
Nuked the pervious files, but the NextUI works
2024-06-11 10:59:56 +02:00

23 lines
634 B
TypeScript

"use client";
import * as React from "react";
import { NextUIProvider } from "@nextui-org/system";
import { useRouter } from "next/navigation";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { ThemeProviderProps } from "next-themes/dist/types";
export interface ProvidersProps {
children: React.ReactNode;
themeProps?: ThemeProviderProps;
}
export function Providers({ children, themeProps }: ProvidersProps) {
const router = useRouter();
return (
<NextUIProvider navigate={router.push}>
<NextThemesProvider {...themeProps}>{children}</NextThemesProvider>
</NextUIProvider>
);
}