Skip to content

Commit

Permalink
Fix Polling for V2 (#9330)
Browse files Browse the repository at this point in the history
* fix polling access

* bonus: fix RegistrationAdministrationList
  • Loading branch information
FinnIckler authored May 2, 2024
1 parent 52ae67b commit 5229333
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ export default function RegistrationAdministrationList({ competitionInfo }) {
// than putting this in the table headers which scroll out of sight
const spotsRemaining = (competitionInfo.competitor_limit ?? Infinity) - accepted.length;
const spotsRemainingText = i18n.t(
'competitions.registration_v2.list.spots_remaining',
'competitions.registration_v2.list.spots_remaining',
{ spots: spotsRemaining },
);
Expand Down Expand Up @@ -265,6 +264,7 @@ export default function RegistrationAdministrationList({ competitionInfo }) {
registrations={registrations}
spotsRemaining={spotsRemaining}
userEmailMap={userEmailMap}
competitionInfo={competitionInfo}
/>
</Sticky>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export default async function pollRegistrations(
competitionId,
) {
if (process.env.NODE_ENV === 'production') {
return fetchJsonOrError(pollingRoute(userId, competitionId));
const { data } = await fetchJsonOrError(pollingRoute(userId, competitionId));
return data;
}
return pollingMock(userId, competitionId);
}

0 comments on commit 5229333

Please sign in to comment.