fix(dashboard): remove force color scheme since it breaks the build

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-11-13 22:20:38 +01:00
parent 702ccb82fb
commit 23961c8865

View File

@@ -1,11 +1,13 @@
'use client';
import { NotificationProvider } from '@/components/notifications/notification-provider';
import { TooltipProvider } from '@/components/ui/tooltip';
import { ModalProvider } from '@/modals';
import type { AppStore } from '@/redux';
import makeStore from '@/redux';
import { api } from '@/trpc/client';
import { ClerkProvider, useAuth } from '@clerk/nextjs';
import { OpenPanelComponent } from '@openpanel/nextjs';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { httpLink } from '@trpc/client';
import { ThemeProvider } from 'next-themes';
@@ -15,12 +17,7 @@ import { Provider as ReduxProvider } from 'react-redux';
import { Toaster } from 'sonner';
import superjson from 'superjson';
import { NotificationProvider } from '@/components/notifications/notification-provider';
import { OpenPanelComponent } from '@openpanel/nextjs';
import { useSearchParams } from 'next/navigation';
function AllProviders({ children }: { children: React.ReactNode }) {
const searchParams = useSearchParams();
const { getToken } = useAuth();
const [queryClient] = useState(
() =>
@@ -60,16 +57,12 @@ function AllProviders({ children }: { children: React.ReactNode }) {
storeRef.current = makeStore();
}
const forcedTheme = searchParams.get('colorScheme');
return (
<ThemeProvider
attribute="class"
disableTransitionOnChange
defaultTheme="system"
forcedTheme={
forcedTheme ? (forcedTheme === 'dark' ? 'dark' : 'light') : 'system'
}
forcedTheme={'system'}
>
{process.env.NEXT_PUBLIC_OP_CLIENT_ID && (
<OpenPanelComponent