Merge pull request #927 from getmaxun/cleaner-notifs
feat: cleaner alert notifs
This commit is contained in:
@@ -113,7 +113,7 @@ export const NavBar: React.FC<NavBarProps> = ({
|
|||||||
if (data.ok) {
|
if (data.ok) {
|
||||||
dispatch({ type: "LOGOUT" });
|
dispatch({ type: "LOGOUT" });
|
||||||
window.localStorage.removeItem("user");
|
window.localStorage.removeItem("user");
|
||||||
notify('success', t('navbar.notifications.success.logout'));
|
// notify('success', t('navbar.notifications.success.logout'));
|
||||||
navigate("/login");
|
navigate("/login");
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const AlertSnackbar = ({ severity, message, isOpen }: AlertSnackbarProps)
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Snackbar anchorOrigin={{ vertical: 'top', horizontal: 'center' }} open={open} autoHideDuration={5000} onClose={handleClose}>
|
<Snackbar anchorOrigin={{ vertical: 'top', horizontal: 'center' }} open={open} autoHideDuration={5000} onClose={handleClose}>
|
||||||
<Alert onClose={handleClose} severity={severity} sx={{ width: '100%' }}>
|
<Alert onClose={handleClose} severity={severity} sx={{ width: '100%', bgcolor: 'background.paper' }} variant="outlined">
|
||||||
{message}
|
{message}
|
||||||
</Alert>
|
</Alert>
|
||||||
</Snackbar>
|
</Snackbar>
|
||||||
|
|||||||
Reference in New Issue
Block a user