From 3bb5e12142f705e0d2cc748902de484eac22f4b6 Mon Sep 17 00:00:00 2001 From: Lucas Steinmacher Date: Tue, 26 Sep 2023 16:46:07 -0700 Subject: [PATCH 01/22] feat: added link to events page --- app/elements/view-event.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/elements/view-event.mjs b/app/elements/view-event.mjs index acfe324..ba5d7de 100644 --- a/app/elements/view-event.mjs +++ b/app/elements/view-event.mjs @@ -27,5 +27,10 @@ export default function ViewEvent({ html, state = {} }) { > +
+ + See all past events + +
` } From 9feaa2e6c545776de574a32b7365edc19d30b27e Mon Sep 17 00:00:00 2001 From: Lucas Steinmacher Date: Tue, 26 Sep 2023 16:48:17 -0700 Subject: [PATCH 02/22] feat: added events-list.mjs and rendering it on pages/events.mjs --- app/elements/events-list.mjs | 36 ++++++++++++++++++++++++++++++++++++ app/pages/events.mjs | 12 ++++-------- 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 app/elements/events-list.mjs diff --git a/app/elements/events-list.mjs b/app/elements/events-list.mjs new file mode 100644 index 0000000..16d7965 --- /dev/null +++ b/app/elements/events-list.mjs @@ -0,0 +1,36 @@ +export default function EventsList({ html, state }) { + const { store } = state + const events = store.data + + if (events.length > 0) { + return html` + +