[#378] addressed code rabbit out of scope comments (#422)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-12-16 14:06:16 +01:00
committed by GitHub
parent c81153a119
commit 1a60850637
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ function App() {
const lang = const lang =
[userLanguage, settingsLanguage, savedLang, defaultLang].find( [userLanguage, settingsLanguage, savedLang, defaultLang].find(
(l): l is string => isValidLanguage(l) (l) => !!l && isValidLanguage(l)
) || "en"; ) || "en";
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
+3 -4
View File
@@ -992,10 +992,9 @@ function formatEnd(
const startDate = new Date(start); const startDate = new Date(start);
const endDate = new Date(end); const endDate = new Date(end);
const sameDay = const formatDatePart = (d: Date) =>
startDate.getFullYear() === endDate.getFullYear() && d.toLocaleDateString("en-CA", { timeZone }); // YYYY-MM-DD format
startDate.getMonth() === endDate.getMonth() && const sameDay = formatDatePart(startDate) === formatDatePart(endDate);
startDate.getDate() === endDate.getDate();
if (allday) { if (allday) {
return sameDay return sameDay