import React from 'react'; import { useUIContext } from '../../../context/UIContext/useUIContext'; import './NotificationDisplay.css'; /** * Displays the current notification message from UIContext. */ export const NotificationDisplay: React.FC = () => { const { warningMessage, clearWarningMessage } = useUIContext(); if (!warningMessage) { return null; } const { text, type, id } = warningMessage; return (
{text} {/* Add a close button only for persistent errors? */} {type === 'error' && ( )}
); }; export default NotificationDisplay;