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:
parent
586f1d5f8f
commit
7549cbb90b
3 changed files with 6 additions and 6 deletions
|
|
@ -145,7 +145,7 @@ export default function CollectionCardComponent({
|
||||||
{data?.metadata !== undefined && (
|
{data?.metadata !== undefined && (
|
||||||
<div className="flex gap-3">
|
<div className="flex gap-3">
|
||||||
{data.private && (
|
{data.private && (
|
||||||
<ShadTooltip content={data.private ? "Private" : "Public"}>
|
<ShadTooltip content="Private">
|
||||||
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
||||||
<IconComponent name="Lock" className="h-4 w-4" />
|
<IconComponent name="Lock" className="h-4 w-4" />
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -600,7 +600,7 @@ export async function getStoreComponents({
|
||||||
sort = "-count(liked_by)",
|
sort = "-count(liked_by)",
|
||||||
tags = [] || null,
|
tags = [] || null,
|
||||||
liked = null,
|
liked = null,
|
||||||
status = null,
|
isPrivate = null,
|
||||||
search = null,
|
search = null,
|
||||||
filterByUser = null,
|
filterByUser = null,
|
||||||
}: {
|
}: {
|
||||||
|
|
@ -610,7 +610,7 @@ export async function getStoreComponents({
|
||||||
sort?: string;
|
sort?: string;
|
||||||
tags?: string[] | null;
|
tags?: string[] | null;
|
||||||
liked?: boolean | null;
|
liked?: boolean | null;
|
||||||
status?: string | null;
|
isPrivate?: boolean | null;
|
||||||
search?: string | null;
|
search?: string | null;
|
||||||
filterByUser?: boolean | null;
|
filterByUser?: boolean | null;
|
||||||
}): Promise<StoreComponentResponse | undefined> {
|
}): Promise<StoreComponentResponse | undefined> {
|
||||||
|
|
@ -620,8 +620,8 @@ export async function getStoreComponents({
|
||||||
if (search !== undefined && search !== null) {
|
if (search !== undefined && search !== null) {
|
||||||
queryParams.push(`search=${search}`);
|
queryParams.push(`search=${search}`);
|
||||||
}
|
}
|
||||||
if (status !== undefined && status !== null) {
|
if (isPrivate !== undefined && isPrivate !== null) {
|
||||||
queryParams.push(`status=${status}`);
|
queryParams.push(`private=${isPrivate}`);
|
||||||
}
|
}
|
||||||
if (tags !== undefined && tags !== null && tags.length > 0) {
|
if (tags !== undefined && tags !== null && tags.length > 0) {
|
||||||
queryParams.push(`tags=${tags.join(encodeURIComponent(","))}`);
|
queryParams.push(`tags=${tags.join(encodeURIComponent(","))}`);
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export default function StorePage(): JSX.Element {
|
||||||
sort: pageOrder === "Popular" ? "-count(downloads)" : "name",
|
sort: pageOrder === "Popular" ? "-count(downloads)" : "name",
|
||||||
tags: filteredCategories,
|
tags: filteredCategories,
|
||||||
liked: selectFilter === "likedbyme" && validApiKey ? true : null,
|
liked: selectFilter === "likedbyme" && validApiKey ? true : null,
|
||||||
status: null,
|
isPrivate: null,
|
||||||
search: inputText === "" ? null : inputText,
|
search: inputText === "" ? null : inputText,
|
||||||
filterByUser: selectFilter === "createdbyme" && validApiKey ? true : null,
|
filterByUser: selectFilter === "createdbyme" && validApiKey ? true : null,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue