Skip to content

Commit

Permalink
Hide registration countdown button when already registered
Browse files Browse the repository at this point in the history
  • Loading branch information
eikhr committed Sep 26, 2024
1 parent ad22137 commit 907cf30
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/routes/events/components/JoinEventForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,13 @@ const JoinEventForm = ({ title, event, registration }: Props) => {
/>
)}

{event.activationTime && registrationOpensIn && (
<Button disabled={disabledButton}>
{`Åpner om ${moment(registrationOpensIn.add(1, 'second').asMilliseconds()).format('mm:ss')}`}
</Button>
)}
{event.activationTime &&
registrationOpensIn &&
!registration && (
<Button disabled={disabledButton}>
{`Åpner om ${moment(registrationOpensIn.add(1, 'second').asMilliseconds()).format('mm:ss')}`}
</Button>
)}

{buttonOpen && !submitting && !registrationPending && (
<>
Expand Down

0 comments on commit 907cf30

Please sign in to comment.