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.
This commit is contained in:
cristhianzl 2023-11-17 00:15:52 -03:00
commit 706baf0fda

View file

@ -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]);