diff --git a/src/utils/index.tsx b/src/utils/index.tsx index 8b9f5dd..c0acc9f 100644 --- a/src/utils/index.tsx +++ b/src/utils/index.tsx @@ -66,9 +66,8 @@ export const timeLeft = (end): string => { if (yearsDiff > 0) return yearsDiff === 1 ? `${yearsDiff} year` : `${yearsDiff} year` if (monthsDiff > 0) return monthsDiff === 1 ? `${monthsDiff} month` : `${monthsDiff} months` - if (weeksDiff > 0) return weeksDiff === 1 ? `${daysDiff} week` : `${daysDiff} week` if (daysDiff > 0) return daysDiff === 1 ? `${daysDiff} day` : `${daysDiff} days` - if (hoursDiff > 0) return hoursDiff === 1 ? `${daysDiff} hour` : `${hoursDiff} hours` + if (hoursDiff > 0) return hoursDiff === 1 ? `${hoursDiff} hour` : `${hoursDiff} hours` return minsDiff === 1 ? `${minsDiff} minute` : `${minsDiff} minutes` }