diff --git a/directus-config b/directus-config
index 793e148..2ba1c26 160000
--- a/directus-config
+++ b/directus-config
@@ -1 +1 @@
-Subproject commit 793e1488034da14386330b4d82bf4369c6a780e1
+Subproject commit 2ba1c26b12d968bf8e3b7565f25eb9c7ba2a3c05
diff --git a/src/actions/common-client.tsx b/src/actions/common-client.tsx
index 791546e..f942754 100644
--- a/src/actions/common-client.tsx
+++ b/src/actions/common-client.tsx
@@ -193,12 +193,11 @@ export function formatTime(time: string) {
export function makeInfoItems(
event: Event,
- location: string,
isDeposit: boolean = false
): [ElementType, ReactNode][] {
return [
[CalendarIcon, formatDate(event)],
- [MapPinIcon, location],
+ [MapPinIcon, event.location],
[PriceIcon, isDeposit ? formatDeposit(event) : formatPrice(event)],
];
}
diff --git a/src/app/[eventSlug]/guest/page.tsx b/src/app/[eventSlug]/guest/page.tsx
index d1a1976..d7421c4 100644
--- a/src/app/[eventSlug]/guest/page.tsx
+++ b/src/app/[eventSlug]/guest/page.tsx
@@ -23,6 +23,7 @@ export default async function GuestForm({ params }) {
'meals',
'price',
'opened',
+ 'location',
//@ts-expect-error
{ translations: ['*'] },
],
@@ -44,7 +45,7 @@ export default async function GuestForm({ params }) {
switch (event.type) {
case 'faculty_dinner':
return (
-
+
);
default:
return notFound();
diff --git a/src/app/[eventSlug]/page.tsx b/src/app/[eventSlug]/page.tsx
index 5eae397..dbdbc88 100644
--- a/src/app/[eventSlug]/page.tsx
+++ b/src/app/[eventSlug]/page.tsx
@@ -31,7 +31,8 @@ export default async function Home({ params }) {
'confirmation_text',
'background_color',
'icbd_event',
- //@ts-expect-error
+ 'location',
+ //@ts-expect-error
{ translations: ['*'] },
],
filter: {
@@ -54,14 +55,14 @@ export default async function Home({ params }) {
return ;
case 'faculty_dinner':
return (
-
+
);
case 'hello_world':
- return ;
+ return ;
case 'faculty_clothes_sale':
return ;
default:
- return ;
+ return ;
}
}
diff --git a/src/components/forms/BasicForm.tsx b/src/components/forms/BasicForm.tsx
index ec1a8c1..13352fa 100644
--- a/src/components/forms/BasicForm.tsx
+++ b/src/components/forms/BasicForm.tsx
@@ -51,15 +51,9 @@ async function validateValues(s: State, eventId: number) {
return null;
}
-export default function BasicForm({
- event,
- location,
-}: {
- event: Event;
- location: string;
-}) {
+export default function BasicForm({ event }: { event: Event }) {
// Info items
- const infoItems: [ElementType, ReactNode][] = makeInfoItems(event, location);
+ const infoItems: [ElementType, ReactNode][] = makeInfoItems(event);
// Define initial state
const initialState: State = {
diff --git a/src/components/forms/FacultyDinnerForm.tsx b/src/components/forms/FacultyDinnerForm.tsx
index 045f866..31a0580 100644
--- a/src/components/forms/FacultyDinnerForm.tsx
+++ b/src/components/forms/FacultyDinnerForm.tsx
@@ -82,15 +82,13 @@ async function validateValues(s: State, eventId: number, guest: boolean) {
export default function FacultyDinnerForm({
event,
- location,
guest = false,
}: {
event: Event;
- location: string;
guest: boolean;
}) {
// Info items
- const infoItems: [ElementType, ReactNode][] = makeInfoItems(event, location);
+ const infoItems: [ElementType, ReactNode][] = makeInfoItems(event);
const meals: Meal[] = event.meals as Meal[];
diff --git a/src/components/forms/HelloWorldForm.tsx b/src/components/forms/HelloWorldForm.tsx
index 08a6560..2521ae4 100644
--- a/src/components/forms/HelloWorldForm.tsx
+++ b/src/components/forms/HelloWorldForm.tsx
@@ -70,15 +70,9 @@ async function validateValues(s: State, eventId: number) {
return null;
}
-export default function HelloWorldForm({
- event,
- location,
-}: {
- event: Event;
- location: string;
-}) {
+export default function HelloWorldForm({ event }: { event: Event }) {
// Info items
- const infoItems: [ElementType, ReactNode][] = makeInfoItems(event, location);
+ const infoItems: [ElementType, ReactNode][] = makeInfoItems(event);
// Define initial state
const initialState: State = {
diff --git a/src/components/forms/ICBDForm.tsx b/src/components/forms/ICBDForm.tsx
index 992c8ef..27b244d 100644
--- a/src/components/forms/ICBDForm.tsx
+++ b/src/components/forms/ICBDForm.tsx
@@ -110,7 +110,6 @@ export default function ICBDForm({
// Info items
const infoItems: [ElementType, ReactNode][] = makeInfoItems(
event,
- location,
true
);
diff --git a/src/components/forms/PullFacForm.tsx b/src/components/forms/PullFacForm.tsx
index 4247493..ec7281f 100644
--- a/src/components/forms/PullFacForm.tsx
+++ b/src/components/forms/PullFacForm.tsx
@@ -97,7 +97,6 @@ export default function FacultyClothesForm({
// Skip the date, since this is just an order
const infoItems: [ElementType, ReactNode][] = makeInfoItems(
event,
- location
).slice(1);
// Define initial state