diff --git a/frontend/client-portal/src/contexts/LaravelAuthContext.tsx b/frontend/client-portal/src/contexts/LaravelAuthContext.tsx index 7c09b5fa..896cc131 100755 --- a/frontend/client-portal/src/contexts/LaravelAuthContext.tsx +++ b/frontend/client-portal/src/contexts/LaravelAuthContext.tsx @@ -144,9 +144,6 @@ function AuthProvider({ children }: AuthProviderProps) { const logout = () => { setSession(null); - localStorage.removeItem('loginOrVerifyCode'); - localStorage.removeItem('emailOrPhone'); - localStorage.removeItem('emailOrPhoneForm'); dispatch({ type: Types.Logout }); }; diff --git a/frontend/client-portal/src/layouts/dashboard/header/AccountPopover.tsx b/frontend/client-portal/src/layouts/dashboard/header/AccountPopover.tsx index e9a01e1c..64bb2e33 100755 --- a/frontend/client-portal/src/layouts/dashboard/header/AccountPopover.tsx +++ b/frontend/client-portal/src/layouts/dashboard/header/AccountPopover.tsx @@ -45,7 +45,7 @@ export default function AccountPopover() { const handleLogout = () => { logout(); navigate('/auth/login'); - enqueueSnackbar('Berhasi Logout!', 'success'); + enqueueSnackbar('Logout Berhasil!', { variant: 'success' }); }; return ( diff --git a/frontend/client-portal/src/sections/auth/login/VerifyCodeForm.tsx b/frontend/client-portal/src/sections/auth/login/VerifyCodeForm.tsx index a84d76f7..7580971d 100755 --- a/frontend/client-portal/src/sections/auth/login/VerifyCodeForm.tsx +++ b/frontend/client-portal/src/sections/auth/login/VerifyCodeForm.tsx @@ -103,6 +103,9 @@ export default function VerifyCodeForm({ navigate('/dashboard'); enqueueSnackbar('Login Berhasil!', { variant: 'success' }); + localStorage.removeItem('loginOrVerifyCode'); + localStorage.removeItem('emailOrPhone'); + localStorage.removeItem('emailOrPhoneForm'); }; const handleChangeWithNextField = (