mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 19:49:25 +01:00
15 lines
362 B
TypeScript
15 lines
362 B
TypeScript
// Helper hook to show error notifications
|
|
import { useNotifications } from '../context/NotificationContext';
|
|
|
|
const useErrorNotification = () => {
|
|
const { addNotification } = useNotifications();
|
|
|
|
const showError = (message: string) => {
|
|
addNotification({ message, type: 'error' });
|
|
};
|
|
|
|
return { showError };
|
|
};
|
|
|
|
export default useErrorNotification;
|