diff --git a/package.json b/package.json
index 977eac8..6a09a48 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/poap-family",
- "version": "1.5.4",
+ "version": "1.5.5",
"author": {
"name": "POAP",
"url": "https://poap.xyz"
diff --git a/src/components/PageError.js b/src/components/PageError.js
index 51d7bf7..6761bd0 100644
--- a/src/components/PageError.js
+++ b/src/components/PageError.js
@@ -28,7 +28,14 @@ function PageError({ onRemoveAllEvents = null, onRemoveEvent = null }) {
{isRouteErrorResponse(error) && typeof error.data.errorsByEventId === 'object' && (
<>
{onRemoveAllEvents && (
- <>{' '} onRemoveAllEvents(Object.keys(error.data.errorsByEventId))}>remove all>
+ <>
+ {' '}
+ onRemoveAllEvents(Object.keys(error.data.errorsByEventId))}
+ >
+ remove all
+
+ >
)}
{Object.entries(error.data.errorsByEventId).map(
([eventId, error]) => (
diff --git a/src/loaders/event.js b/src/loaders/event.js
index 77c4f5c..923e4c2 100644
--- a/src/loaders/event.js
+++ b/src/loaders/event.js
@@ -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,
{
diff --git a/src/pages/Events.js b/src/pages/Events.js
index 3561d90..9d54d18 100644
--- a/src/pages/Events.js
+++ b/src/pages/Events.js
@@ -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)
@@ -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])]))
}