Skip to content

Commit

Permalink
Merge pull request #124 from poap-xyz/release/1.6.15
Browse files Browse the repository at this point in the history
Release 1.6.15
  • Loading branch information
jm42 authored Jan 6, 2024
2 parents 09f5dfa + 026b044 commit fe7bb66
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
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.6.14",
"version": "1.6.15",
"author": {
"name": "POAP",
"url": "https://poap.xyz"
Expand Down
5 changes: 5 additions & 0 deletions src/loaders/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ async function getEventAndOwners(eventId, includeMetrics = true) {
!('emailClaimsMinted' in body.metrics) || typeof body.metrics.emailClaimsMinted !== 'number' ||
!('emailClaims' in body.metrics) || typeof body.metrics.emailClaims !== 'number' ||
!('momentsUploaded' in body.metrics) || typeof body.metrics.momentsUploaded !== 'number' ||
!('collectionsIncludes' in body.metrics) || typeof body.metrics.collectionsIncludes !== 'number' ||
!('ts' in body.metrics) || (typeof body.metrics.ts !== 'number' && body.metrics.ts !== null)
) {
return {
Expand All @@ -67,6 +68,7 @@ async function getEventAndOwners(eventId, includeMetrics = true) {
emailClaimsMinted: 0,
emailClaims: 0,
momentsUploaded: 0,
collectionsIncludes: 0,
ts: null,
},
}
Expand All @@ -80,6 +82,7 @@ async function getEventAndOwners(eventId, includeMetrics = true) {
emailClaimsMinted: body.metrics.emailClaimsMinted,
emailClaims: body.metrics.emailClaims,
momentsUploaded: body.metrics.momentsUploaded,
collectionsIncludes: body.metrics.collectionsIncludes,
ts: body.metrics.ts,
},
}
Expand Down Expand Up @@ -340,6 +343,7 @@ async function getEventMetrics(eventId, abortSignal, refresh = false) {
!('emailClaimsMinted' in metrics) || typeof metrics.emailClaimsMinted !== 'number' ||
!('emailClaims' in metrics) || typeof metrics.emailClaims !== 'number' ||
!('momentsUploaded' in metrics) || typeof metrics.momentsUploaded !== 'number' ||
!('collectionsIncludes' in metrics) || typeof metrics.collectionsIncludes !== 'number' ||
!('ts' in metrics) || (typeof metrics.ts !== 'number' && metrics.ts !== null)
) {
return null
Expand All @@ -349,6 +353,7 @@ async function getEventMetrics(eventId, abortSignal, refresh = false) {
emailClaimsMinted: metrics.emailClaimsMinted,
emailClaims: metrics.emailClaims,
momentsUploaded: metrics.momentsUploaded,
collectionsIncludes: metrics.collectionsIncludes,
ts: metrics.ts,
}
}
Expand Down
1 change: 1 addition & 0 deletions src/loaders/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ async function eventLoader({ params, request }) {
emailClaimsMinted: 0,
emailClaims: 0,
momentsUploaded: 0,
collectionsIncludes: 0,
ts: null,
},
}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ function Event() {
title: `${Math.trunc(metrics.emailClaimsMinted * 100 / metrics.emailClaims)}% of ${metrics.emailClaims} email claims`,
}
: undefined,
'collections': metrics && metrics.collectionsIncludes > 1
? formatStat(metrics.collectionsIncludes)
: undefined,
'moments': metrics && metrics.momentsUploaded > 0
? {
text: formatStat(metrics.momentsUploaded),
Expand Down

0 comments on commit fe7bb66

Please sign in to comment.