From ba72c5b95f1c1dba395770d28b5ca06fd81b723c Mon Sep 17 00:00:00 2001 From: Diego Alzate Date: Thu, 1 Aug 2024 16:11:29 +0100 Subject: [PATCH] add filter to event id --- packages/berlin/src/components/header/Header.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/berlin/src/components/header/Header.tsx b/packages/berlin/src/components/header/Header.tsx index eaf91a7c..bd2f3b63 100644 --- a/packages/berlin/src/components/header/Header.tsx +++ b/packages/berlin/src/components/header/Header.tsx @@ -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 = [ {