Skip to content

Commit 4cdb7fa

Browse files
authored
Merge pull request #13 from austrovis/feat/registration-toggle
Feat/registration toggle
2 parents a92c579 + 94593f5 commit 4cdb7fa

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

app/register/page.tsx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import { useState } from 'react';
44
import { getUpcomingEvents } from '@/lib/events';
55

6+
const REGISTRATION_OPEN = false; // Toggle this to open/close registration
7+
68
export default function RegisterPage() {
79
const upcomingEvents = getUpcomingEvents();
810
const nextEvent = upcomingEvents[0];
@@ -133,19 +135,25 @@ export default function RegisterPage() {
133135
});
134136
};
135137

136-
if (!nextEvent) {
137-
return (
138+
// Registration is locked for this edition
139+
if(!REGISTRATION_OPEN) {
140+
return (
138141
<main className="min-h-screen bg-white dark:bg-[#36393f] darkest:bg-black pt-32 pb-16 px-4">
139142
<div className="max-w-2xl mx-auto text-center">
140-
<h1 className="text-4xl font-bold text-black dark:text-white darkest:text-white mb-4">Registration</h1>
141-
<p className="text-lg text-black/60 dark:text-[#b9bbbe] darkest:text-white/60">
142-
No upcoming events are scheduled at the moment. Please check back later.
143-
</p>
143+
<h1 className="text-4xl font-bold text-black dark:text-white darkest:text-white mb-4">Registration Closed</h1>
144+
<div className="bg-black/5 dark:bg-[#2f3136] darkest:bg-black border border-black/10 dark:border-[#40444b] darkest:border-white/20 rounded-lg p-8 mb-8">
145+
<p className="text-lg text-black dark:text-white darkest:text-white mb-2">
146+
Registration for this edition of the workshop is now <span className="font-semibold">closed</span>.
147+
</p>
148+
<p className="text-black/70 dark:text-[#b9bbbe] darkest:text-white/70">
149+
Please wait for an announcement for the next one!
150+
</p>
151+
</div>
144152
</div>
145153
</main>
146-
);
154+
)
147155
}
148-
156+
else {
149157
return (
150158
<main className="min-h-screen bg-white dark:bg-[#36393f] darkest:bg-black pt-32 pb-16 px-4">
151159
<div className="max-w-2xl mx-auto">
@@ -371,3 +379,4 @@ export default function RegisterPage() {
371379
</main>
372380
);
373381
}
382+
}

lib/events.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ export const events: Event[] = [
7979
recording: '',
8080
},
8181
},
82+
{
83+
id: '7',
84+
title: '7th Edition AustroVis Workshop',
85+
date: new Date('2026-00-00'),
86+
location: '',
87+
university: '',
88+
description: 'The seventh edition of the AustroVis Workshop.',
89+
speakers: [''],
90+
materials: {
91+
slides: '',
92+
recording: '',
93+
},
94+
},
8295
];
8396

8497
export function getPastEvents(): Event[] {

0 commit comments

Comments
 (0)