Fixed filterByUser
This commit is contained in:
parent
5bf969f8b4
commit
9c78d0afd9
3 changed files with 5 additions and 8 deletions
|
|
@ -599,7 +599,7 @@ export async function getStoreComponents(
|
|||
liked?: boolean | null,
|
||||
status?: string | null,
|
||||
search?: string | null,
|
||||
filterByUser?: string | null
|
||||
filterByUser?: boolean | null
|
||||
): Promise<StoreComponentResponse | undefined> {
|
||||
try {
|
||||
let url = `${BASE_URL_API}store/components/`;
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue