Function: useTrendingTags()
useTrendingTags(
timeWindow,options):UseQueryResult<{tags:object[];timeWindow:"day"|"week"|"month"; },Error>
Defined in: web/lib/hooks/use-tags.ts:275
Fetches trending tags.
Parameters
timeWindow
Time window for trending calculation
"day" | "week" | "month"
options
UseTagsOptions = {}
Hook options
Returns
UseQueryResult<{ tags: object[]; timeWindow: "day" | "week" | "month"; }, Error>
Query result with trending tags
Remarks
Returns tags that are gaining popularity within a time window. Useful for discovery and exploring active topics.
Example
const { data } = useTrendingTags('week');
return (
<TrendingTags
tags={data?.tags ?? []}
timeWindow={data?.timeWindow ?? 'week'}
/>
);