diff options
Diffstat (limited to 'src/screens/Search/modules/ExploreTrendingTopics.tsx')
-rw-r--r-- | src/screens/Search/modules/ExploreTrendingTopics.tsx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/screens/Search/modules/ExploreTrendingTopics.tsx b/src/screens/Search/modules/ExploreTrendingTopics.tsx index 75ca19351..167f6d193 100644 --- a/src/screens/Search/modules/ExploreTrendingTopics.tsx +++ b/src/screens/Search/modules/ExploreTrendingTopics.tsx @@ -17,6 +17,7 @@ import {type Props as SVGIconProps} from '#/components/icons/common' import {Flame_Stroke2_Corner1_Rounded as FlameIcon} from '#/components/icons/Flame' import {Trending3_Stroke2_Corner1_Rounded as TrendingIcon} from '#/components/icons/Trending' import {Link} from '#/components/Link' +import {SubtleHover} from '#/components/SubtleHover' import {Text} from '#/components/Typography' const TOPIC_COUNT = 5 @@ -28,10 +29,10 @@ export function ExploreTrendingTopics() { } function Inner() { - const {data: trending, error, isLoading} = useGetTrendsQuery() + const {data: trending, error, isLoading, isRefetching} = useGetTrendsQuery() const noTopics = !isLoading && !error && !trending?.trends?.length - return isLoading ? ( + return isLoading || isRefetching ? ( Array.from({length: TOPIC_COUNT}).map((__, i) => ( <TrendingTopicRowSkeleton key={i} withPosts={i === 0} /> )) @@ -92,25 +93,23 @@ export function TrendRow({ PressableComponent={Pressable}> {({hovered, pressed}) => ( <> - <View - style={[ - gutters, - a.w_full, - a.py_lg, - a.flex_row, - a.gap_2xs, - (hovered || pressed) && t.atoms.bg_contrast_25, - ]}> + <SubtleHover hover={hovered || pressed} /> + <View style={[gutters, a.w_full, a.py_lg, a.flex_row, a.gap_2xs]}> <View style={[a.flex_1, a.gap_xs]}> <View style={[a.flex_row]}> <Text - style={[a.text_md, a.font_bold, a.leading_snug, {width: 20}]}> + style={[ + a.text_md, + a.font_bold, + a.leading_tight, + {width: 20}, + ]}> <Trans comment='The trending topic rank, i.e. "1. March Madness", "2. The Bachelor"'> {rank}. </Trans> </Text> <Text - style={[a.text_md, a.font_bold, a.leading_snug]} + style={[a.text_md, a.font_bold, a.leading_tight]} numberOfLines={1}> {trend.displayName} </Text> |