From d2550b4c3c71b9522117fccec9da1462af676e3d Mon Sep 17 00:00:00 2001 From: spiral Date: Wed, 3 Nov 2021 03:31:35 -0400 Subject: [PATCH] don't write over a const variable --- src/Pages/Home.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/Home.js b/src/Pages/Home.js index 69dad2fe..7957c4e2 100644 --- a/src/Pages/Home.js +++ b/src/Pages/Home.js @@ -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);