Skip to content

Commit

Permalink
Only show calendar btn if user is attendee
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikskog committed Aug 30, 2023
1 parent c0396eb commit aa68102
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/events/components/DetailView/AttendanceEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ const AttendanceEvent: FC<IProps> = ({ eventId, eventTitle }) => {
<PublicAttendeesWrapper isAttending={attendanceEvent.is_attendee} canAttend={isEligibleForSignup}>
<ParticipantsButton eventTitle={eventTitle} eventId={eventId} />
</PublicAttendeesWrapper>
<a href={`https://old.online.ntnu.no/events/${eventId}.ics`} className={style.calendarButton}>
<Button variant="outline">Legg til i kalender</Button>
</a>
{attendanceEvent.is_attendee && (
<a href={`https://old.online.ntnu.no/events/${eventId}.ics`} className={style.calendarButton}>
<Button variant="outline">Legg til i kalender</Button>
</a>
)}
</div>
{attendanceEvent.payment && (
<Block title="Pris" className={`${style.fullBlock} ${style.priceBlock}`}>
Expand Down

0 comments on commit aa68102

Please sign in to comment.