#94 fix user switcher

parent dbf94cc2
...@@ -24,8 +24,9 @@ const SwitchUserModal= ({open, handleClose})=> { ...@@ -24,8 +24,9 @@ const SwitchUserModal= ({open, handleClose})=> {
const usersAllFields = useSelector(state => state.users.usersAllFields) const usersAllFields = useSelector(state => state.users.usersAllFields)
const navigate= useNavigate(); const navigate= useNavigate();
const submitFormHandler=(e, currentUser)=>{ const submitFormHandler=(e, currentUser)=>{
dispatch(logoutUser(navigate)) dispatch(logoutUser(navigate))
e.preventDefault(); e.preventDefault();
e.preventDefault();
dispatch(loginUser({ dispatch(loginUser({
"email": currentUser.email, "email": currentUser.email,
"password": "123" "password": "123"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment