Portal/rsconcept/frontend/src/app/global-toaster.tsx
2025-08-05 20:01:18 +03:00

13 lines
430 B
TypeScript

'use client';
import { ToastContainer, type ToastContainerProps } from 'react-toastify';
import { usePreferencesStore } from '@/stores/preferences';
interface ToasterThemedProps extends Omit<ToastContainerProps, 'theme'> {}
export function ToasterThemed(props: ToasterThemedProps) {
const darkMode = usePreferencesStore(state => state.darkMode);
return <ToastContainer theme={darkMode ? 'dark' : 'light'} {...props} />;
}