79677160

Date: 2025-06-24 07:25:24
Score: 0.5
Natty:
Report link

Update the useEffect in your UserContextProvider to clear the user when the isAuthorized state changes to false, you're already handling the true condition.

useEffect(() => {
  if (isAuthorized === true) {
    get_user();
  } else {
    setUser(null);
  }
}, [isAuthorized]);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: UncleBigBay