don't write over a const variable
This commit is contained in:
parent
a898beea1d
commit
d2550b4c3c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user