From 207032df05b42cb96fb90262d2a190a404af9e26 Mon Sep 17 00:00:00 2001 From: StevanFreeborn Date: Wed, 29 Jun 2022 20:20:52 -0500 Subject: [PATCH] added setting error message back to null when handling try again --- client/src/pages/home.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/pages/home.js b/client/src/pages/home.js index 3cd59be..3605abc 100644 --- a/client/src/pages/home.js +++ b/client/src/pages/home.js @@ -55,6 +55,8 @@ export default function Home() { const handleTryAgain = async () => { + setErrorMessage(null); + if (errorMessage === 'Failed to load characters.') return await getCharacters(); }