mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 23:28:11 +00:00
fix: theme toggle
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { useTheme } from "next-themes"
|
||||
import { Toaster as Sonner, ToasterProps } from "sonner"
|
||||
|
||||
// Pinned to "light": the app is light-only. This previously read next-themes'
|
||||
// useTheme, which falls back to "system" when no ThemeProvider is mounted (and
|
||||
// none is) — sonner then resolves "system" against prefers-color-scheme and
|
||||
// rendered dark toasts over a light UI on any OS set to dark.
|
||||
const Toaster = ({ ...props }: ToasterProps) => {
|
||||
const { theme = "system" } = useTheme()
|
||||
|
||||
return (
|
||||
<Sonner
|
||||
theme={theme as ToasterProps["theme"]}
|
||||
theme="light"
|
||||
className="toaster group"
|
||||
toastOptions={{
|
||||
classNames: {
|
||||
|
||||
Reference in New Issue
Block a user