diff --git a/src/components/primitives/Time.tsx b/src/components/primitives/Time.tsx index f4b41648..d32b8fec 100644 --- a/src/components/primitives/Time.tsx +++ b/src/components/primitives/Time.tsx @@ -12,12 +12,12 @@ export default function Time({ timestamp, prefix }: TimeProps) { const then = moment(Number(timestamp)).fromNow(); return then - .replace(/in\s/, prefix ? `${prefix} ` : "in ") + .replace(/in\s/, prefix ? `${prefix} ` : "In ") .replace(/\bminute(s?)\b/g, "m") .replace(/\bsecond(s?)\b/g, "s") - .replace(/\bhour(s?)\b/g, "hours") - .replace(/\bday(s?)\b/g, "days") - .replace(/\bmonth(s?)\b/g, (match, plural) => (plural ? "months" : "month")); + .replace(/\bhour(s?)\b/g, (_match, plural) => (plural ? "hours" : "hour")) + .replace(/\bday(s?)\b/g, (_match, plural) => (plural ? "days" : "day")) + .replace(/\bmonth(s?)\b/g, (_match, plural) => (plural ? "months" : "month")); }, [timestamp, prefix]); return time;