don't write over a const variable

This commit is contained in:
spiral 2021-11-03 03:31:35 -04:00
parent a898beea1d
commit d2550b4c3c
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -51,7 +51,7 @@ const Home = ({isInvalid, setIsInvalid, isLoading, setIsLoading, isSubmit, setIs
setIsInvalid(true);
setErrorMessage(error.message);
if (error.message === "HTTP Status 401")
errorMessage = "Your token is invalid."
setErrorMessage("Your token is invalid.")
localStorage.removeItem("token");
localStorage.removeItem("user");
setIsLoading(false);