diff --git a/src/frontend/src/contexts/storeContext.tsx b/src/frontend/src/contexts/storeContext.tsx index d1078de04..d9a3194c9 100644 --- a/src/frontend/src/contexts/storeContext.tsx +++ b/src/frontend/src/contexts/storeContext.tsx @@ -47,6 +47,7 @@ export function StoreProvider({ children }) { setValidApiKey(res?.is_valid ?? false); setLoadingApiKey(false); } catch (e) { + setLoadingApiKey(false); console.log(e); } }; diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index de177451e..3257c57af 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -732,7 +732,7 @@ export async function searchComponent( export async function checkHasApiKey() { try { - const res = await api.get(`${BASE_URL_API}/store/check/api_key`); + const res = await api.get(`${BASE_URL_API}store/check/api_key`); if (res?.status === 200) { return res.data; } diff --git a/src/frontend/src/pages/StorePage/index.tsx b/src/frontend/src/pages/StorePage/index.tsx index 086bef094..56dfda709 100644 --- a/src/frontend/src/pages/StorePage/index.tsx +++ b/src/frontend/src/pages/StorePage/index.tsx @@ -57,7 +57,7 @@ export default function StorePage(): JSX.Element { "You don't have an API Key. Please add one to use the Langflow Store.", ], }); - setLoading(false) + setLoading(false); } else if (!validApiKey) { setErrorData({ title: "API Key Error", @@ -87,10 +87,15 @@ export default function StorePage(): JSX.Element { function handleGetTags() { setLoadingTags(true); - getStoreTags().then((res) => { - setTags(res); - setLoadingTags(false); - }); + getStoreTags() + .then((res) => { + setTags(res); + setLoadingTags(false); + }) + .catch((err) => { + console.log(err); + setLoadingTags(false); + }); } function handleGetComponents() {