Skip to content

Commit

Permalink
Merge pull request #86 from poap-xyz/release/v1.5.5
Browse files Browse the repository at this point in the history
Release v1.5.5
  • Loading branch information
jm42 authored Jun 12, 2023
2 parents f9e5c1a + ecb1a53 commit 4f0bc4a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/poap-family",
"version": "1.5.4",
"version": "1.5.5",
"author": {
"name": "POAP",
"url": "https://poap.xyz"
Expand Down
9 changes: 8 additions & 1 deletion src/components/PageError.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ function PageError({ onRemoveAllEvents = null, onRemoveEvent = null }) {
{isRouteErrorResponse(error) && typeof error.data.errorsByEventId === 'object' && (
<>
{onRemoveAllEvents && (
<>{' '}<ButtonLink onClick={() => onRemoveAllEvents(Object.keys(error.data.errorsByEventId))}>remove all</ButtonLink></>
<>
{' '}
<ButtonLink
onClick={() => onRemoveAllEvents(Object.keys(error.data.errorsByEventId))}
>
remove all
</ButtonLink>
</>
)}
{Object.entries(error.data.errorsByEventId).map(
([eventId, error]) => (
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ async function eventsLoader({ params, request }) {
if (Object.keys(errorsByEventId).length > 0) {
const response = JSON.stringify({
errorsByEventId: Object.fromEntries(
Object.entries(eventsNotFound).map(
Object.entries(errorsByEventId).map(
([eventId, error]) => ([
eventId,
{
Expand Down
14 changes: 12 additions & 2 deletions src/pages/Events.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,12 @@ function Events() {
for (const eventId of eventIds) {
if ((loadedCount[eventId] ?? 0) === owners[eventId].length) {
eventsLoaded++
if (eventId in eventData && !eventData[eventId].ts && !(eventId in errors) && !(eventId in loading)) {
if (
eventId in eventData &&
!eventData[eventId].ts &&
!(eventId in errors) &&
!(eventId in loading)
) {
const inCommonProcessed = Object.fromEntries(
filterAndSortInCommon(
Object.entries(eventData[eventId].inCommon)
Expand Down Expand Up @@ -531,7 +536,12 @@ function Events() {
)
}
}
} else if (!(eventId in loading) && eventId in eventData && eventId in eventData[eventId].inCommon && eventData[eventId].inCommon[eventId].length < owners[eventId].length) {
} else if (
!(eventId in loading) &&
eventId in eventData &&
eventId in eventData[eventId].inCommon &&
eventData[eventId].inCommon[eventId].length !== owners[eventId].length
) {
eventsLoaded++
setStaleEvents((oldStaleEvents) => ([...new Set([...oldStaleEvents, eventId])]))
}
Expand Down

0 comments on commit 4f0bc4a

Please sign in to comment.