fix(cardComponent): update ShadTooltip content to always display "Private" for private cards

fix(API): update parameter name from status to isPrivate for consistency and clarity
fix(StorePage): update parameter name from status to isPrivate to match API changes and improve semantics
This commit is contained in:
anovazzi1 2023-11-21 17:19:49 -03:00
commit 7549cbb90b
3 changed files with 6 additions and 6 deletions

View file

@ -145,7 +145,7 @@ export default function CollectionCardComponent({
{data?.metadata !== undefined && (
<div className="flex gap-3">
{data.private && (
<ShadTooltip content={data.private ? "Private" : "Public"}>
<ShadTooltip content="Private">
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
<IconComponent name="Lock" className="h-4 w-4" />
</span>

View file

@ -600,7 +600,7 @@ export async function getStoreComponents({
sort = "-count(liked_by)",
tags = [] || null,
liked = null,
status = null,
isPrivate = null,
search = null,
filterByUser = null,
}: {
@ -610,7 +610,7 @@ export async function getStoreComponents({
sort?: string;
tags?: string[] | null;
liked?: boolean | null;
status?: string | null;
isPrivate?: boolean | null;
search?: string | null;
filterByUser?: boolean | null;
}): Promise<StoreComponentResponse | undefined> {
@ -620,8 +620,8 @@ export async function getStoreComponents({
if (search !== undefined && search !== null) {
queryParams.push(`search=${search}`);
}
if (status !== undefined && status !== null) {
queryParams.push(`status=${status}`);
if (isPrivate !== undefined && isPrivate !== null) {
queryParams.push(`private=${isPrivate}`);
}
if (tags !== undefined && tags !== null && tags.length > 0) {
queryParams.push(`tags=${tags.join(encodeURIComponent(","))}`);

View file

@ -111,7 +111,7 @@ export default function StorePage(): JSX.Element {
sort: pageOrder === "Popular" ? "-count(downloads)" : "name",
tags: filteredCategories,
liked: selectFilter === "likedbyme" && validApiKey ? true : null,
status: null,
isPrivate: null,
search: inputText === "" ? null : inputText,
filterByUser: selectFilter === "createdbyme" && validApiKey ? true : null,
})