mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-22 20:51:29 +10:00
Delete Account: added more unit tests
This commit is contained in:
@ -66,8 +66,8 @@ const UserProvider = ({ children }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const logout = () => {
|
||||
firebase.auth().signOut();
|
||||
const logout = async () => {
|
||||
await firebase.auth().signOut();
|
||||
localStorage.removeItem('user');
|
||||
setUser(null);
|
||||
navigate('/');
|
||||
@ -123,7 +123,7 @@ const UserProvider = ({ children }) => {
|
||||
} catch (error) {
|
||||
toast.error(error.message);
|
||||
} finally {
|
||||
logout();
|
||||
await logout();
|
||||
toast(
|
||||
"It's sad to see you go, but we respect your privacy. All your data has been deleted successfully. Hope to see you again soon!",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user