project-nomad/admin/inertia/hooks/useErrorNotification.ts
2025-08-08 15:07:32 -07:00

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;