Skip to content

Commit b542356

Browse files
committed
Eventpage: Join waiting list button logic added
1 parent b92fb9a commit b542356

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/app/student/events/_components/EventDetails.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,19 @@ export default function EventDetails({
9898
{event.open_for_signup_student &&
9999
today < (event.registration_end ?? event.event_start) ? (
100100
<Link href={event.signup_link ?? ""}>
101-
<Button className="w-full">Sign Up</Button>
101+
<Button className="w-full">
102+
{event.participant_count < event.event_max_capacity
103+
? "Signup"
104+
: "Join waiting List"}
105+
</Button>
102106
</Link>
103107
) : (
104108
<Button disabled>
105109
{today < (event.registration_end ?? event.event_start) ? (
106110
<> Signup opening soon ! </>
107111
) : (
108112
<>
109-
Registration closed
113+
Registration closed{" "}
110114
{event.registration_end
111115
? formatTimestampAsDate(event.registration_end)
112116
: ""}

0 commit comments

Comments
 (0)