From b8bf50997fb96bd3ddadefa3ee949d8a0bcd7486 Mon Sep 17 00:00:00 2001 From: indaviande Date: Wed, 11 Dec 2024 18:44:55 +0100 Subject: [PATCH 1/3] lint --- src/components/primitives/Time.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/primitives/Time.tsx b/src/components/primitives/Time.tsx index d32b8fec9..19213e501 100644 --- a/src/components/primitives/Time.tsx +++ b/src/components/primitives/Time.tsx @@ -15,8 +15,8 @@ export default function Time({ timestamp, prefix }: TimeProps) { .replace(/in\s/, prefix ? `${prefix} ` : "In ") .replace(/\bminute(s?)\b/g, "m") .replace(/\bsecond(s?)\b/g, "s") - .replace(/\bhour(s?)\b/g, (_match, plural) => (plural ? "hours" : "hour")) - .replace(/\bday(s?)\b/g, (_match, plural) => (plural ? "days" : "day")) + .replace(/\bhour(s?)\b/g, "hours") + .replace(/\bday(s?)\b/g, "days") .replace(/\bmonth(s?)\b/g, (_match, plural) => (plural ? "months" : "month")); }, [timestamp, prefix]); From 36c582b7b81cfef48c6afca30f536643e1f85ab5 Mon Sep 17 00:00:00 2001 From: indaviande Date: Mon, 16 Dec 2024 10:01:54 +0100 Subject: [PATCH 2/3] lint' --- src/components/extenders/Select.tsx | 3 ++- src/utils/types.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/extenders/Select.tsx b/src/components/extenders/Select.tsx index e32560b7b..2c896899b 100644 --- a/src/components/extenders/Select.tsx +++ b/src/components/extenders/Select.tsx @@ -236,7 +236,8 @@ export default function Select< // resetValueOnHide setValue={value => { setSearch(value); - }}> + }} + > setValue(v as Value)} value={value as string} diff --git a/src/utils/types.ts b/src/utils/types.ts index 67b117fb9..16104e3e8 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -1,4 +1,3 @@ -import type { Dispatch, SetStateAction } from "react"; import type { Coloring, Mode, State } from "../theming/variables"; /** From c69c9d7d80c00a8b69e271710a9be4b0b264fbef Mon Sep 17 00:00:00 2001 From: indaviande Date: Mon, 16 Dec 2024 10:10:46 +0100 Subject: [PATCH 3/3] fix --- src/components/primitives/Time.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/primitives/Time.tsx b/src/components/primitives/Time.tsx index 19213e501..d32b8fec9 100644 --- a/src/components/primitives/Time.tsx +++ b/src/components/primitives/Time.tsx @@ -15,8 +15,8 @@ export default function Time({ timestamp, prefix }: TimeProps) { .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(/\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]);