File size: 742 Bytes
ad19202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"use client";

import { ProgressProvider } from "@bprogress/next/app";
import { config } from "@repo/config";
import { Toaster } from "@ui/components/toast";
import { ThemeProvider } from "next-themes";
import type { PropsWithChildren } from "react";

export function ClientProviders({ children }: PropsWithChildren) {
	return (
		<ProgressProvider
			height="4px"
			color="var(--color-primary)"
			options={{ showSpinner: false }}
			shallowRouting
			delay={250}
		>
			<ThemeProvider
				attribute="class"
				disableTransitionOnChange
				enableSystem
				defaultTheme={config.ui.defaultTheme}
				themes={config.ui.enabledThemes}
			>
				{children}

				<Toaster position="top-right" />
			</ThemeProvider>
		</ProgressProvider>
	);
}