From c5a67e12e3a58a26fea26cbe4282b8f7d940e810 Mon Sep 17 00:00:00 2001 From: Ramiro Vazquez Date: Wed, 27 May 2020 12:59:54 -0300 Subject: [PATCH] fix typo --- src/utils/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/index.tsx b/src/utils/index.tsx index c0acc9f..d306b48 100644 --- a/src/utils/index.tsx +++ b/src/utils/index.tsx @@ -60,11 +60,10 @@ export const timeLeft = (end): string => { const minsDiff = differenceInMinutes(end_date, today) const hoursDiff = differenceInHours(end_date, today) const daysDiff = differenceInDays(end_date, today) - const weeksDiff = differenceInWeeks(end_date, today) const monthsDiff = differenceInMonths(end_date, today) const yearsDiff = differenceInYears(end_date, today) - if (yearsDiff > 0) return yearsDiff === 1 ? `${yearsDiff} year` : `${yearsDiff} year` + if (yearsDiff > 0) return yearsDiff === 1 ? `${yearsDiff} year` : `${yearsDiff} years` if (monthsDiff > 0) return monthsDiff === 1 ? `${monthsDiff} month` : `${monthsDiff} months` if (daysDiff > 0) return daysDiff === 1 ? `${daysDiff} day` : `${daysDiff} days` if (hoursDiff > 0) return hoursDiff === 1 ? `${hoursDiff} hour` : `${hoursDiff} hours`