Skip to content

Commit

Permalink
Eventpage: Join waiting list button logic added
Browse files Browse the repository at this point in the history
  • Loading branch information
Duosi-Dai committed Nov 13, 2024
1 parent 4390f26 commit 5e670a9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/student/events/_components/EventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,19 @@ export default function EventDetails({
{event.open_for_signup_student &&
today < (event.registration_end ?? event.event_start) ? (
<Link href={event.signup_link ?? ""}>
<Button className="w-full">Sign Up</Button>
<Button className="w-full">
{event.participant_count < event.event_max_capacity
? "Signup"
: "Join waiting List"}
</Button>
</Link>
) : (
<Button disabled>
{today < (event.registration_end ?? event.event_start) ? (
<> Signup opening soon ! </>
) : (
<>
Registration closed
Registration closed{" "}
{event.registration_end
? formatTimestampAsDate(event.registration_end)
: ""}
Expand Down

0 comments on commit 5e670a9

Please sign in to comment.