From fd5a739e4dfcb92602598337cb80452f9ef4a901 Mon Sep 17 00:00:00 2001 From: Robert Eggl Date: Wed, 27 Nov 2024 01:07:01 +0100 Subject: [PATCH] fix(events): update EventsCard and API to support multilingual titles --- rogue-thi-app/components/cards/EventsCard.jsx | 2 +- rogue-thi-app/lib/backend/neuland-api.js | 2 +- rogue-thi-app/pages/events.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rogue-thi-app/components/cards/EventsCard.jsx b/rogue-thi-app/components/cards/EventsCard.jsx index 3f4902ca..52fbd810 100644 --- a/rogue-thi-app/components/cards/EventsCard.jsx +++ b/rogue-thi-app/components/cards/EventsCard.jsx @@ -41,7 +41,7 @@ export default function EventsCard() { {calendar.slice(0, 2).map((x, i) => ( -
{x.title[locale]}
+
{x.titles[locale]}
{x.host?.name && (
{t('events.organizer.attribute')} {x.host.name} diff --git a/rogue-thi-app/lib/backend/neuland-api.js b/rogue-thi-app/lib/backend/neuland-api.js index e882ac87..08d19190 100644 --- a/rogue-thi-app/lib/backend/neuland-api.js +++ b/rogue-thi-app/lib/backend/neuland-api.js @@ -131,7 +131,7 @@ class NeulandAPIClient { website instagram } - title { + titles { de en } diff --git a/rogue-thi-app/pages/events.jsx b/rogue-thi-app/pages/events.jsx index 50f203c1..1a9695db 100644 --- a/rogue-thi-app/pages/events.jsx +++ b/rogue-thi-app/pages/events.jsx @@ -249,7 +249,7 @@ export default function Events({ initialCampusEvents, sportsEvents }) { className={styles.item} >
- {!item.url && item.title[locale]} + {!item.url && item.titles[locale]} {item.url && (