diff --git a/src/components/RelativeTime.tsx b/src/components/RelativeTime.tsx index 7dfd3c6a..5b1589f4 100644 --- a/src/components/RelativeTime.tsx +++ b/src/components/RelativeTime.tsx @@ -3,11 +3,10 @@ import { FormattedRelativeTime } from 'react-intl' import { AppState } from 'react-native' export interface Props { - type: 'past' | 'future' time: string | number } -const RelativeTime: React.FC = ({ type, time }) => { +const RelativeTime: React.FC = ({ time }) => { const [now, setNow] = useState(new Date().getTime()) useEffect(() => { const appStateListener = AppState.addEventListener('change', state => { @@ -21,9 +20,7 @@ const RelativeTime: React.FC = ({ type, time }) => { return ( ) diff --git a/src/components/Timeline/Shared/HeaderShared/Created.tsx b/src/components/Timeline/Shared/HeaderShared/Created.tsx index 9830d72a..8ce2a56b 100644 --- a/src/components/Timeline/Shared/HeaderShared/Created.tsx +++ b/src/components/Timeline/Shared/HeaderShared/Created.tsx @@ -32,7 +32,7 @@ const HeaderSharedCreated = React.memo( /> ) : ( - + )} {edited_at ? ( diff --git a/src/components/Timeline/Shared/Poll.tsx b/src/components/Timeline/Shared/Poll.tsx index fddc8a8d..a44c44fd 100644 --- a/src/components/Timeline/Shared/Poll.tsx +++ b/src/components/Timeline/Shared/Poll.tsx @@ -269,7 +269,7 @@ const TimelinePoll: React.FC = ({ )) }, [theme, allOptions]) - const pollVoteCounts = useMemo(() => { + const pollVoteCounts = () => { if (poll.voters_count !== null) { return ( t('shared.poll.meta.count.voters', { count: poll.voters_count }) + ' • ' @@ -279,9 +279,9 @@ const TimelinePoll: React.FC = ({ t('shared.poll.meta.count.votes', { count: poll.votes_count }) + ' • ' ) } - }, [poll.voters_count, poll.votes_count]) + } - const pollExpiration = useMemo(() => { + const pollExpiration = () => { if (poll.expired) { return t('shared.poll.meta.expiration.expired') } else { @@ -289,12 +289,12 @@ const TimelinePoll: React.FC = ({ return ( ]} + components={[]} /> ) } } - }, [theme, i18n.language, poll.expired, poll.expires_at]) + } return ( @@ -312,8 +312,8 @@ const TimelinePoll: React.FC = ({ fontStyle='S' style={{ flexShrink: 1, color: colors.secondary }} > - {pollVoteCounts} - {pollExpiration} + {pollVoteCounts()} + {pollExpiration()} diff --git a/src/i18n/en/components/timeline.json b/src/i18n/en/components/timeline.json index 6a3341a1..f622a093 100644 --- a/src/i18n/en/components/timeline.json +++ b/src/i18n/en/components/timeline.json @@ -139,7 +139,7 @@ }, "expiration": { "expired": "Vote expired", - "until": "Expires in <0 />" + "until": "Expires <0 />" } } } diff --git a/src/screens/Announcements.tsx b/src/screens/Announcements.tsx index 2efc34a6..e38df48c 100644 --- a/src/screens/Announcements.tsx +++ b/src/screens/Announcements.tsx @@ -93,7 +93,7 @@ const ScreenAnnouncements: React.FC< + ]} />