Merge pull request #955 from getmaxun/alert-cloud
fix: alert cloud sync
This commit is contained in:
@@ -32,9 +32,9 @@ export const AlertSnackbar = ({ severity, message, isOpen }: AlertSnackbarProps)
|
||||
|
||||
return (
|
||||
<Snackbar anchorOrigin={{ vertical: 'top', horizontal: 'center' }} open={open} autoHideDuration={5000} onClose={handleClose}>
|
||||
<Alert onClose={handleClose} severity={severity} sx={{ width: '100%', bgcolor: 'background.paper' }} variant="outlined">
|
||||
<Alert onClose={handleClose} severity={severity} sx={{ width: '100%', bgcolor: 'background.paper', border: "none" }} variant="outlined">
|
||||
{message}
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,6 @@ const Login = () => {
|
||||
{ withCredentials: true }
|
||||
);
|
||||
dispatch({ type: "LOGIN", payload: data });
|
||||
notify("success", t('login.welcome_notification'));
|
||||
window.localStorage.setItem("user", JSON.stringify(data));
|
||||
navigate("/");
|
||||
} catch (err: any) {
|
||||
|
||||
@@ -49,7 +49,6 @@ const Register = () => {
|
||||
try {
|
||||
const { data } = await axios.post(`${apiUrl}/auth/register`, { email, password });
|
||||
dispatch({ type: "LOGIN", payload: data });
|
||||
notify("success", t('register.welcome_notification'));
|
||||
window.localStorage.setItem("user", JSON.stringify(data));
|
||||
navigate("/");
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user