Open ishraat opened 3 years ago
The state of cart (if there were items in it) is not set to empty when user signs out.
export const signout = () => (dispatch) => { localStorage.removeItem('userInfo'); localStorage.removeItem('cartItems'); dispatch({ type: USER_SIGNOUT }); };
try to use Signout instead of . as Link doesn't refresh the page after signing out. In Navbar(Header)
I have worked on E Commerce Projects. I believe I would be able to fix it. Can I work on it ?
The state of cart (if there were items in it) is not set to empty when user signs out.
export const signout = () => (dispatch) => { localStorage.removeItem('userInfo'); localStorage.removeItem('cartItems'); dispatch({ type: USER_SIGNOUT }); };