Skip to content

Commit

Permalink
Update Timer.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
tommygonzaleza authored Oct 8, 2024
1 parent 857cce4 commit 3f4c405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/components/Timer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ function Timer({ startingAt, onFinish, autoRemove, variant, ...rest }) {
<Text {...rest}>
{autoRemove && timer?.months <= 0 ? null : `${timer?.months} ${timer?.months === 1 ? t('word-connector.month') : t('word-connector.months')} `}
{autoRemove && timer?.days <= 0 ? null : `${timer?.days} ${timer?.days === 1 ? t('word-connector.day') : t('word-connector.days')} `}
{autoRemove && timer?.months > 0 || (timer?.hours <= 0 && timer?.days <= 0) ? null : `${timer?.hours} ${timer?.hours === 1 ? t('word-connector.hour') : t('word-connector.hours')} `}
{autoRemove && timer?.days > 0 || (timer?.minutes <= 0 && timer?.hours <= 0 && timer?.days <= 0) ? null : `${timer.minutes} ${timer?.minutes === 1 ? t('word-connector.minute') : t('word-connector.minutes')} `}
{(autoRemove && timer?.hours <= 0 && timer?.days <= 0) || timer?.months > 0 ? null : `${timer?.hours} ${timer?.hours === 1 ? t('word-connector.hour') : t('word-connector.hours')} `}
{(autoRemove && timer?.minutes <= 0 && timer?.hours <= 0 && timer?.days <= 0) || timer?.days > 0 ? null : `${timer.minutes} ${timer?.minutes === 1 ? t('word-connector.minute') : t('word-connector.minutes')} `}
{timer?.hours <= 0 && `${timer.seconds} ${t('word-connector.seconds')}`}
</Text>
);
Expand Down

0 comments on commit 3f4c405

Please sign in to comment.