diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index 34b1b1ce4..8e2dca38f 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -599,7 +599,7 @@ export async function getStoreComponents( liked?: boolean | null, status?: string | null, search?: string | null, - filterByUser?: string | null + filterByUser?: boolean | null ): Promise { try { let url = `${BASE_URL_API}store/components/`; diff --git a/src/frontend/src/modals/StoreApiKeyModal/index.tsx b/src/frontend/src/modals/StoreApiKeyModal/index.tsx index 42b4db08e..c61d57138 100644 --- a/src/frontend/src/modals/StoreApiKeyModal/index.tsx +++ b/src/frontend/src/modals/StoreApiKeyModal/index.tsx @@ -27,7 +27,7 @@ export default function StoreApiKeyModal({ const { storeApiKey } = useContext(AuthContext); const { hasApiKey } = useContext(StoreContext); const [apiKeyValue, setApiKeyValue] = useState( - hasApiKey ? "this is not a real api key :)" : "" + hasApiKey ? "This is not a real api key." : "" ); function handleInput({ @@ -44,10 +44,6 @@ export default function StoreApiKeyModal({ } }, [open]); - function resetForm() { - setApiKeyValue(""); - } - const handleSaveKey = () => { if (inputState && inputState["apikey"]) { addApiKeyStore(inputState["apikey"]).then( @@ -55,7 +51,7 @@ export default function StoreApiKeyModal({ setSuccessData({ title: "Success! Your API Key has been saved.", }); - storeApiKey("9bxW74lS1qee3UWKMx3Vydxu5wxPqC8W"); + storeApiKey(inputState["apikey"]); setOpen(false); }, (error) => { diff --git a/src/frontend/src/pages/StorePage/index.tsx b/src/frontend/src/pages/StorePage/index.tsx index d4c0738dc..52c6f05af 100644 --- a/src/frontend/src/pages/StorePage/index.tsx +++ b/src/frontend/src/pages/StorePage/index.tsx @@ -72,7 +72,8 @@ export default function StorePage(): JSX.Element { filteredCategories, selectFilter === "likedbyme" ? true : null, null, - searchText === "" ? null : searchText + searchText === "" ? null : searchText, + selectFilter === "createdbyme" ? true : null ) .then((res) => { setLoading(false);