Fix key issue in trending topics (#7329)

This commit is contained in:
dan
2025-01-02 17:27:15 +00:00
committed by GitHub
parent 9f075b1340
commit c11a90124c
+18 -20
View File
@@ -59,26 +59,24 @@ export function Inner() {
) : !trending?.topics ? null : ( ) : !trending?.topics ? null : (
<> <>
{trending.topics.map(topic => ( {trending.topics.map(topic => (
<> <TrendingTopicLink
<TrendingTopicLink key={topic.link}
key={topic.link} topic={topic}
topic={topic} onPress={() => {
onPress={() => { logEvent('trendingTopic:click', {context: 'interstitial'})
logEvent('trendingTopic:click', {context: 'interstitial'}) }}>
}}> <View style={[a.py_lg]}>
<View style={[a.py_lg]}> <Text
<Text style={[
style={[ t.atoms.text,
t.atoms.text, a.text_sm,
a.text_sm, a.font_bold,
a.font_bold, {opacity: 0.7}, // NOTE: we use opacity 0.7 instead of a color to match the color of the home pager tab bar
{opacity: 0.7}, // NOTE: we use opacity 0.7 instead of a color to match the color of the home pager tab bar ]}>
]}> {topic.topic}
{topic.topic} </Text>
</Text> </View>
</View> </TrendingTopicLink>
</TrendingTopicLink>
</>
))} ))}
<Button <Button
label={_(msg`Hide trending topics`)} label={_(msg`Hide trending topics`)}