From 706baf0fda4a192896760e5d0f18d10c96b9b75e Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Fri, 17 Nov 2023 00:15:52 -0300 Subject: [PATCH] refactor(StorePage): remove unnecessary error handling code for invalid API Key The code was checking for the presence of an API Key and displaying an error message if it was missing or invalid. However, this logic is no longer needed as the API Key is now always required and validated before reaching this point. Therefore, the code that handles the case of an invalid API Key is no longer necessary and has been removed for simplicity and clarity. --- src/frontend/src/pages/StorePage/index.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/frontend/src/pages/StorePage/index.tsx b/src/frontend/src/pages/StorePage/index.tsx index 7d77fcb9a..e80a18125 100644 --- a/src/frontend/src/pages/StorePage/index.tsx +++ b/src/frontend/src/pages/StorePage/index.tsx @@ -55,13 +55,6 @@ export default function StorePage(): JSX.Element { "You don't have an API Key. Please add one to use the Langflow Store.", ], }); - } else if (!validApiKey) { - setErrorData({ - title: "API Key Error", - list: [ - "Your API Key is not valid. Please add a valid API Key to use the Langflow Store.", - ], - }); } } }, [loadingApiKey, validApiKey, hasApiKey]);