Skip to content

Commit

Permalink
Replace ExpandedPostDetails Text comps
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed Oct 2, 2024
1 parent 9cbb444 commit 2323043
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/view/com/post-thread/PostThreadItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ function ExpandedPostDetails({
needsTranslation: boolean
translatorUrl: string
}) {
const t = useTheme()
const pal = usePalette('default')
const {_, i18n} = useLingui()
const openLink = useOpenLink()
Expand All @@ -713,23 +714,25 @@ function ExpandedPostDetails({
}, [openLink, translatorUrl])

return (
<View style={[a.flex_row, a.align_center, a.flex_wrap, a.gap_xs, a.pt_md]}>
<Text style={[a.text_sm, pal.textLight]}>
<View style={[a.flex_row, a.align_center, a.flex_wrap, a.gap_sm, a.pt_md]}>
<NewText style={[a.text_sm, t.atoms.text_contrast_medium]}>
{niceDate(i18n, post.indexedAt)}
</Text>
</NewText>
{isRootPost && (
<WhoCanReply post={post} isThreadAuthor={isThreadAuthor} />
)}
{needsTranslation && (
<>
<Text style={[a.text_sm, pal.textLight]}>&middot;</Text>
<NewText style={[a.text_sm, t.atoms.text_contrast_medium]}>
&middot;
</NewText>

<Text
<NewText
style={[a.text_sm, pal.link]}
title={_(msg`Translate`)}
onPress={onTranslatePress}>
<Trans>Translate</Trans>
</Text>
</NewText>
</>
)}
</View>
Expand Down

0 comments on commit 2323043

Please sign in to comment.