Skip to content

Commit

Permalink
feat: use event end_date instead of start_date for POAP verification
Browse files Browse the repository at this point in the history
- Modified event date display to show end_date (with fallback to start_date)
- Updated eventInfo object to store end_date (with fallback to start_date)
- This change better reflects when POAPs are given at event closure
  • Loading branch information
devin-ai-integration[bot] committed Nov 17, 2024
1 parent 438f445 commit bce57e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/EventAttendanceVerification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const EventAttendanceVerification: React.FC<EventAttendanceVerificationProps> =
// Combine verified name and POAP info for attestation
const eventInfo: EventInfo = {
role,
date: ethGlobalBrusselsPoap.event.start_date,
date: ethGlobalBrusselsPoap.event.end_date || ethGlobalBrusselsPoap.event.start_date,
venue: EVENT_VENUE,
verifiedName: verifiedName,
tokenId: ethGlobalBrusselsPoap.tokenId
Expand Down Expand Up @@ -198,7 +198,7 @@ const EventAttendanceVerification: React.FC<EventAttendanceVerificationProps> =
<p className="text-base font-semibold">{poapDetails.event.name}</p>
<div className="flex flex-col text-sm opacity-75">
<p>🎭 Role: {poapDetails.event.name.replace('ETHGlobal Brussels 2024', '')}</p>
<p>πŸ“… Date: {new Date(poapDetails.event.start_date).toLocaleDateString()}</p>
<p>πŸ“… Date: {new Date(poapDetails.event.end_date || poapDetails.event.start_date).toLocaleDateString()}</p>
<p>πŸ“ Venue: {EVENT_VENUE}</p>
<p>🎫 Token ID: {poapDetails.tokenId}</p>
</div>
Expand Down

0 comments on commit bce57e5

Please sign in to comment.