Skip to content

Commit

Permalink
add filter to event id
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoalzate committed Aug 1, 2024
1 parent 6431e24 commit ba72c5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/berlin/src/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ const HeaderLinks = ({ user }: { user: GetUserResponse }) => {
if (eventId) {
// User is within an event
const approvedRegistration =
registrationsData?.some((registration) => registration.status === 'APPROVED') ?? false;
registrationsData
?.filter((reg) => reg.eventId === eventId)
.some((registration) => registration.status === 'APPROVED') ?? false;

const eventBaseLinks = [
{
Expand Down

0 comments on commit ba72c5b

Please sign in to comment.