Skip to content

Commit

Permalink
Hide attendance filter when logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepTester committed Apr 18, 2024
1 parent 2049ab6 commit 3ac4d1a
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/pages/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,24 @@ const EventsPage = ({ events, attendances, initialFilters, loggedOut }: EventsPa
/>
</div>

<div className={styles.filterOption}>
<Dropdown
name="attendanceOptions"
ariaLabel="Filter events by attendance"
options={[
{ value: 'any', label: 'Any Attendance' },
{ value: 'attended', label: 'Attended' },
{ value: 'not-attended', label: 'Not Attended' },
]}
value={attendanceFilter}
onChange={v => {
setStates('attendance', v);
setPage(0);
}}
/>
</div>
{loggedOut ? null : (
<div className={styles.filterOption}>
<Dropdown
name="attendanceOptions"
ariaLabel="Filter events by attendance"
options={[
{ value: 'any', label: 'Any Attendance' },
{ value: 'attended', label: 'Attended' },
{ value: 'not-attended', label: 'Not Attended' },
]}
value={attendanceFilter}
onChange={v => {
setStates('attendance', v);
setPage(0);
}}
/>
</div>
)}
</div>
<EventDisplay events={displayedEvents} attendances={attendances} />

Expand Down

0 comments on commit 3ac4d1a

Please sign in to comment.