ieeeucsd-org/src/components/dashboard/universal/ToastProvider.tsx
2025-03-01 17:53:43 -08:00

30 lines
No EOL
821 B
TypeScript

import { Toaster } from 'react-hot-toast';
// Centralized toast provider to ensure consistent rendering
export default function ToastProvider() {
return (
<Toaster
position="top-center"
toastOptions={{
duration: 4000,
style: {
background: '#333',
color: '#fff',
borderRadius: '8px',
padding: '12px',
},
success: {
style: {
background: 'green',
},
},
error: {
style: {
background: 'red',
},
duration: 2000,
},
}}
/>
);
}