mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
30 lines
811 B
TypeScript
30 lines
811 B
TypeScript
'use client';
|
|
|
|
import { Toaster } from 'sonner';
|
|
import { ClerkProvider } from '@clerk/nextjs';
|
|
import { dark } from '@clerk/themes';
|
|
import { useTheme } from 'next-themes';
|
|
|
|
import { ModalProvider } from '@/components/providers/modal-provider';
|
|
import { QueryProvider } from '@/components/providers/query-provider';
|
|
|
|
const PlatformLayout = ({ children }: { children: React.ReactNode }) => {
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
return (
|
|
<ClerkProvider
|
|
afterSignOutUrl='/'
|
|
appearance={{
|
|
baseTheme: resolvedTheme === 'dark' ? dark : undefined,
|
|
}}
|
|
>
|
|
<QueryProvider>
|
|
<Toaster theme={resolvedTheme === 'dark' ? 'dark' : 'light'} />
|
|
<ModalProvider />
|
|
{children}
|
|
</QueryProvider>
|
|
</ClerkProvider>
|
|
);
|
|
};
|
|
|
|
export default PlatformLayout;
|