Turn 'include reason' on posts into a link

zio/stable
Paul Frazee 2022-11-14 13:36:09 -06:00
parent 482ddc9c0d
commit 12ac6fe52e
1 changed files with 10 additions and 4 deletions

View File

@ -65,15 +65,21 @@ export const FeedItem = observer(function FeedItem({
return ( return (
<Link style={styles.outer} href={itemHref} title={itemTitle}> <Link style={styles.outer} href={itemHref} title={itemTitle}>
{item.repostedBy && ( {item.repostedBy && (
<View style={styles.includeReason}> <Link
style={styles.includeReason}
href={`/profile/${item.repostedBy.handle}`}
title={item.repostedBy.displayName || item.repostedBy.handle}>
<FontAwesomeIcon icon="retweet" style={styles.includeReasonIcon} /> <FontAwesomeIcon icon="retweet" style={styles.includeReasonIcon} />
<Text style={[s.gray4, s.bold, s.f13]}> <Text style={[s.gray4, s.bold, s.f13]}>
Reposted by {item.repostedBy.displayName || item.repostedBy.handle} Reposted by {item.repostedBy.displayName || item.repostedBy.handle}
</Text> </Text>
</View> </Link>
)} )}
{item.trendedBy && ( {item.trendedBy && (
<View style={styles.includeReason}> <Link
style={styles.includeReason}
href={`/profile/${item.trendedBy.handle}`}
title={item.trendedBy.displayName || item.trendedBy.handle}>
<FontAwesomeIcon <FontAwesomeIcon
icon="arrow-trend-up" icon="arrow-trend-up"
style={styles.includeReasonIcon} style={styles.includeReasonIcon}
@ -81,7 +87,7 @@ export const FeedItem = observer(function FeedItem({
<Text style={[s.gray4, s.bold, s.f13]}> <Text style={[s.gray4, s.bold, s.f13]}>
Trending with {item.trendedBy.displayName || item.trendedBy.handle} Trending with {item.trendedBy.displayName || item.trendedBy.handle}
</Text> </Text>
</View> </Link>
)} )}
<View style={styles.layout}> <View style={styles.layout}>
<Link <Link