make it show 1 streak even if zero if you just posted, because the streak post just hasn't gone through yet

This commit is contained in:
Mary Kate Fain 2025-02-12 15:47:21 -06:00
parent 4e0aa87ab3
commit 6b8caa0ee9
1 changed files with 12 additions and 12 deletions

View File

@ -106,18 +106,18 @@ const StreakModal: React.FC<IStreakModal> = ({ onClose }) => {
</Link>
)}
{account.ditto?.streak?.days > 0 && (
<HStack alignItems='center'>
<Text theme='primary'>
<span role='img' aria-label={intl.formatMessage(messages.streak)}>
<Icon src={flameIcon} className='size-4' />
</span>
</Text>
<Text weight='bold' size='sm' className='text-black'>
{shortNumberFormat(account.ditto.streak.days)}
</Text>
</HStack>
)}
<HStack alignItems='center'>
<Text theme='primary'>
<span role='img' aria-label={intl.formatMessage(messages.streak)}>
<Icon src={flameIcon} className='size-4' />
</span>
</Text>
<Text weight='bold' size='sm' className='text-black'>
{account.ditto?.streak?.days > 0 ?
shortNumberFormat(account.ditto.streak.days) :
<FormattedMessage id='streak_modal.streak_count' defaultMessage='1' />}
</Text>
</HStack>
</HStack>
</Stack>