mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix(theme): sync user theme from DB on all routes, not only dashboard
This commit is contained in:
@@ -6,7 +6,6 @@ import { AppSidebar } from "@/features/layout/app-sidebar";
|
|||||||
import { Header } from "@/features/layout/header";
|
import { Header } from "@/features/layout/header";
|
||||||
import { currentUser } from "@/lib/auth/current-user";
|
import { currentUser } from "@/lib/auth/current-user";
|
||||||
import { isOnboardingDone } from "@/features/onboarding/is-onboarding-done";
|
import { isOnboardingDone } from "@/features/onboarding/is-onboarding-done";
|
||||||
import { ThemeMetaUpdater } from "@/features/theme/theme-meta-updater";
|
|
||||||
import { ModeToggle } from "@/features/theme/mode-toggle";
|
import { ModeToggle } from "@/features/theme/mode-toggle";
|
||||||
import { UpdateNotification } from "@/features/updates/update-notification";
|
import { UpdateNotification } from "@/features/updates/update-notification";
|
||||||
|
|
||||||
@@ -21,7 +20,6 @@ export default async function Layout({ children }: { children: ReactNode }) {
|
|||||||
return (
|
return (
|
||||||
<SidebarProvider>
|
<SidebarProvider>
|
||||||
<div className="flex flex-col lg:flex-row w-full">
|
<div className="flex flex-col lg:flex-row w-full">
|
||||||
<ThemeMetaUpdater />
|
|
||||||
<AppSidebar updateNotification={<UpdateNotification />} />
|
<AppSidebar updateNotification={<UpdateNotification />} />
|
||||||
<SidebarInset>
|
<SidebarInset>
|
||||||
<Header actions={<ModeToggle />} />
|
<Header actions={<ModeToggle />} />
|
||||||
|
|||||||
+2
-2
@@ -5,7 +5,7 @@ import { type PropsWithChildren, Suspense } from "react";
|
|||||||
|
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
import { ErrorLayout } from "@/components/common/error-layout";
|
import { ErrorLayout } from "@/components/common/error-layout";
|
||||||
import { ThemeMetaUpdaterRoot } from "@/features/theme/theme-meta-updater-root";
|
import { ThemeMetaUpdater } from "@/features/theme/theme-meta-updater";
|
||||||
import { ThemeProvider } from "@/features/theme/theme-provider";
|
import { ThemeProvider } from "@/features/theme/theme-provider";
|
||||||
|
|
||||||
export type ProviderProps = PropsWithChildren<{}>;
|
export type ProviderProps = PropsWithChildren<{}>;
|
||||||
@@ -15,7 +15,7 @@ export const Providers = (props: ProviderProps) => {
|
|||||||
return (
|
return (
|
||||||
<Suspense fallback={null}>
|
<Suspense fallback={null}>
|
||||||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
||||||
<ThemeMetaUpdaterRoot />
|
<ThemeMetaUpdater />
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<ErrorLayout>
|
<ErrorLayout>
|
||||||
<Toaster />
|
<Toaster />
|
||||||
|
|||||||
Reference in New Issue
Block a user