Add notification context and privacy toggle for analytics
Introduces a NotificationProvider context to centralize notification logic and state, refactoring UnifiedNotifications to use this context. Adds a privacy toggle to AnalyticsDashboard and RevenueChart to allow hiding sensitive numbers. Updates layout to wrap the app with NotificationProvider.
This commit is contained in:
@@ -4,6 +4,7 @@ import { ThemeProvider } from "@/components/layout/theme-provider"
|
||||
import { Toaster } from "sonner"
|
||||
import type React from "react"
|
||||
import KeepOnline from "@/components/KeepOnline"
|
||||
import { NotificationProvider } from "@/lib/notification-context"
|
||||
import { Metadata, Viewport } from "next"
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] })
|
||||
@@ -70,13 +71,15 @@ export default function RootLayout({
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body className={inter.className}>
|
||||
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem disableTransitionOnChange>
|
||||
<Toaster
|
||||
theme="dark"
|
||||
richColors
|
||||
position="top-right"
|
||||
/>
|
||||
<KeepOnline />
|
||||
{children}
|
||||
<NotificationProvider>
|
||||
<Toaster
|
||||
theme="dark"
|
||||
richColors
|
||||
position="top-right"
|
||||
/>
|
||||
<KeepOnline />
|
||||
{children}
|
||||
</NotificationProvider>
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user