diff --git a/src/components/Challenge/ChallengeViewingDate.tsx b/src/components/Challenge/ChallengeViewingDate.tsx index 4e206b3d13e6ed1f42066dba6bdbadc8dff71749..44726b16894aee0369bc9c0e359266222de20f97 100644 --- a/src/components/Challenge/ChallengeViewingDate.tsx +++ b/src/components/Challenge/ChallengeViewingDate.tsx @@ -23,8 +23,8 @@ const ChallengeViewingDate: React.FC<ChallengeViewingDateProps> = ({ null ) const diffDays = - firstDateWithData && - firstDateWithData.diffNow(['days', 'hours']).toObject().days + firstDateWithData && firstDateWithData.diffNow(['days']).toObject().days + const diffDaysCeil = Math.ceil(diffDays || 0) useEffect(() => { if (challenge) { @@ -44,14 +44,11 @@ const ChallengeViewingDate: React.FC<ChallengeViewingDateProps> = ({ /* eslint-disable @typescript-eslint/camelcase */ return ( <React.Fragment> - {firstDateWithData && - firstDateWithData > DateTime.local() && - diffDays && - diffDays > 0 ? ( + {firstDateWithData && firstDateWithData > DateTime.local() ? ( <div className="view-start-date"> {t('CHALLENGE.VIEW_START', { - diffDays, - smart_count: diffDays, + diffDaysCeil, + smart_count: diffDaysCeil, })} </div> ) : (