mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
fix: Ordre des guardians lors de leur création / déselection correcte si
plusieurs guardians
This commit is contained in:
@ -8,14 +8,20 @@ export const NotificationProvider = ({ children }) => {
|
||||
message: '',
|
||||
type: '',
|
||||
title: '',
|
||||
errorCode: '',
|
||||
});
|
||||
|
||||
const showNotification = (message, type = 'info', title = '') => {
|
||||
setNotification({ message, type, title });
|
||||
const showNotification = (
|
||||
message,
|
||||
type = 'info',
|
||||
title = '',
|
||||
errorCode = ''
|
||||
) => {
|
||||
setNotification({ message, type, title, errorCode });
|
||||
};
|
||||
|
||||
const clearNotification = () => {
|
||||
setNotification({ message: '', type: '', title: '' });
|
||||
setNotification({ message: '', type: '', title: '', errorCode: '' });
|
||||
};
|
||||
|
||||
return (
|
||||
@ -25,6 +31,7 @@ export const NotificationProvider = ({ children }) => {
|
||||
title={notification.title}
|
||||
message={notification.message}
|
||||
type={notification.type}
|
||||
errorCode={notification.errorCode}
|
||||
onClose={clearNotification}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user