diff --git a/src/components/RightSidebar.tsx b/src/components/RightSidebar.tsx index 0433b548..7d5019a9 100644 --- a/src/components/RightSidebar.tsx +++ b/src/components/RightSidebar.tsx @@ -28,7 +28,7 @@ function useIsXl(): boolean { } /** Small sparkline SVG for trending tags. */ -function TrendSparkline() { +export function TrendSparkline() { // Generate a simple random-ish upward sparkline const points = useMemo(() => { const pts: string[] = []; @@ -92,9 +92,11 @@ export function RightSidebar() { >
#{item.tag}
-
- {item.count > 0 && <>{item.count} posts ยท }Trending -
+ {item.count > 0 && ( +
+ {item.count} posts +
+ )}
diff --git a/src/pages/SearchPage.tsx b/src/pages/SearchPage.tsx index 14b1a47c..3e810eda 100644 --- a/src/pages/SearchPage.tsx +++ b/src/pages/SearchPage.tsx @@ -13,6 +13,7 @@ import { Skeleton } from '@/components/ui/skeleton'; import { Switch } from '@/components/ui/switch'; import { useSearchProfiles } from '@/hooks/useSearchProfiles'; import { useStreamPosts } from '@/hooks/useStreamPosts'; +import { TrendSparkline } from '@/components/RightSidebar'; import { useTrendingTags, useSortedPosts } from '@/hooks/useTrending'; import { genUserName } from '@/lib/genUserName'; import { cn, STICKY_HEADER_CLASS } from '@/lib/utils'; @@ -341,10 +342,13 @@ function TrendItem({ trend }: { trend: { tag: string; count: number } }) { to={`/t/${encodeURIComponent(trend.tag)}`} className="flex items-center justify-between px-4 py-2 hover:bg-secondary/30 transition-colors" > - #{trend.tag} - {trend.count > 0 && ( - {trend.count} posts - )} +
+
#{trend.tag}
+ {trend.count > 0 && ( +
{trend.count} posts
+ )} +
+ ); }