mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 00:47:57 +00:00
fix(ui): show stats on trending cards (#3243)
This commit is contained in:
@@ -498,7 +498,7 @@ describe("HomeListingSection", () => {
|
||||
slug: "trending-skill",
|
||||
displayName: "Trending Skill",
|
||||
summary: "Hot this week.",
|
||||
stats: { installs: 999 },
|
||||
stats: { stars: 12, downloads: 340, installs: 999 },
|
||||
},
|
||||
ownerHandle: "builder",
|
||||
},
|
||||
@@ -534,7 +534,7 @@ describe("HomeListingSection", () => {
|
||||
expect(convexQueryMock).toHaveBeenCalledWith("skills:listPublicTrendingPage", { limit: 20 });
|
||||
expect(screen.getByText("Trending Skill")).toBeTruthy();
|
||||
});
|
||||
expect(screen.queryByText("Popularity")).toBeNull();
|
||||
expect(screen.getByLabelText("Popularity").textContent).toBe("12340");
|
||||
expect(screen.queryByText("999")).toBeNull();
|
||||
});
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ export function HomeListingSection({ initialListing = null }: HomeListingSection
|
||||
: plugins;
|
||||
const activeStatus = isSearchMode ? searchStatus : status;
|
||||
const isEmpty = activeStatus === "idle" && activeItems.length === 0;
|
||||
const showSkillStats = !(kind === "skills" && tab === "trending" && !isSearchMode);
|
||||
const showSkillStats = true;
|
||||
const showListingMore =
|
||||
activeStatus === "idle" && (activeItems.length > visibleCount || listingHasMore);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user