[#17] added event counter popup (#665)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2026-03-25 11:14:16 +01:00
committed by GitHub
parent fcccb1fc55
commit 35cd128106
11 changed files with 405 additions and 25 deletions
@@ -0,0 +1,27 @@
import { getTimezoneOffset } from "@/utils/timezone";
import { Typography } from "@linagora/twake-mui";
import { CalendarEvent } from "../EventsTypes";
import { formatDate } from "./utils/formatDate";
import { formatEnd } from "./utils/formatEnd";
export function EventTimeSubtitle({
event,
t,
timezone,
}: {
event: CalendarEvent;
t: (k: string, p?: string | object | undefined) => string;
timezone: string;
}) {
const formattedEnd = event.end
? formatEnd(event.start, event.end, t, timezone, event.allday)
: null;
return (
<Typography color="text.secondaryContainer">
{formatDate(event.start, t, timezone, event.allday)}
{formattedEnd &&
` ${formattedEnd} ${!event.allday ? getTimezoneOffset(timezone, new Date(event.start)) : ""}`}
</Typography>
);
}