organize events by day in UpcomingEvents

This commit is contained in:
2024-06-23 15:39:41 +02:00
parent 19d3866934
commit 50b08b874d
4 changed files with 70 additions and 33 deletions

View File

@ -18,7 +18,7 @@ export const EventItem = ({
size,
}: {
event: SingularEvent | EventFragment;
mode: "list" | "calendar" | "singular";
mode: "list" | "calendar" | "singular-time-only";
size?: "small" | "medium" | "large";
}) => {
const futureOccurrences = getFutureOccurrences(event);
@ -58,14 +58,7 @@ export const EventItem = ({
)}
</div>
)}
{mode === "singular" &&
"occurrence" in event &&
event.occurrence?.start && (
<p className={styles.dates}>
{formatExtendedDateTime(event.occurrence.start)}
</p>
)}
{mode === "calendar" &&
{(mode === "calendar" || mode === "singular-time-only") &&
"occurrence" in event &&
event.occurrence?.start && (
<p className={styles.dates}>