image update
This commit is contained in:
+6
-1
@@ -23,6 +23,11 @@ export function formatMeetingDate(date: string) {
|
||||
});
|
||||
}
|
||||
|
||||
/** Event dates are saved as YYYY-MM-DD (date picker); older free-text dates are shown as typed. */
|
||||
export function formatEventDate(date: string) {
|
||||
return /^\d{4}-\d{2}-\d{2}$/.test(date) ? formatMeetingDate(date) : date;
|
||||
}
|
||||
|
||||
/** A card in the website's "Past Events" list: a manual event or a completed meeting. */
|
||||
export type PastEventCard = {
|
||||
id: string;
|
||||
@@ -55,7 +60,7 @@ export function buildPastEvents(
|
||||
id: e.id,
|
||||
href: `/events/${e.id}`,
|
||||
image: e.image,
|
||||
date: e.date,
|
||||
date: formatEventDate(e.date),
|
||||
title: e.title,
|
||||
text: e.text,
|
||||
kind: "event" as const,
|
||||
|
||||
Reference in New Issue
Block a user