Skip to content

Commit

Permalink
Merge pull request #45 from poap-xyz/release/v1.3.0
Browse files Browse the repository at this point in the history
Release v1.3.0
  • Loading branch information
jm42 authored May 25, 2023
2 parents 6cc600e + 9fbbc02 commit e0c41aa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
13 changes: 3 additions & 10 deletions src/components/EventHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@ import { Link } from 'react-router-dom'
import TokenImage from './TokenImage'
import '../styles/event-header.css'

function EventHeader({ event, linkToEvent = false }) {
function EventHeader({ event, size = 48 }) {
return (
<div className="event-header">
<div className="event-header-image">
{linkToEvent
? (
<Link to={`/event/${event.id}`}>
<TokenImage event={event} size={48} resize={true} />
</Link>
)
: <TokenImage event={event} size={48} resize={true} />
}
<TokenImage event={event} size={size} resize={true} />
</div>
<div className="event-header-info">
<div className="event-id">#{event.id}</div>
<Link className="event-id">#{event.id}</Link>
<h2 title={event.name}>{event.name}</h2>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/components/InCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ function InCommon({
{inCommonEntries.map(
([eventId, addresses]) => (
<div
key={eventId}
className={`in-common-event${activeEventIds.indexOf(eventId) !== -1 ? ' selected' : ''}${showCount > 0 && showCount === addresses.length ? ' perfect' : ''}`}
title={events[eventId].name}
>
<button
key={eventId}
className="event-button"
onClick={() => toggleActiveEventId(eventId)}
>
Expand All @@ -160,6 +160,7 @@ function InCommon({
: <EventCount event={events[eventId]} count={addresses.length} size={64} />
}
</button>
<Link to={`/event/${eventId}`} className="event-id">#{eventId}</Link>
</div>
)
)}
Expand All @@ -182,7 +183,7 @@ function InCommon({
{activeEventIds.map((activeEventId) =>
<div className="active-event" key={activeEventId}>
<Card>
<EventHeader event={events[activeEventId]} linkToEvent={true} />
<EventHeader event={events[activeEventId]} size={48} />
<div className="active-event-actions">
{createActiveTopButtons(activeEventId)}
<ButtonClose onClose={() => removeActiveEventId(activeEventId)} />
Expand Down
1 change: 1 addition & 0 deletions src/styles/event-header.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.event-header .event-id {
font-weight: bold;
line-height: 1.6;
color: black;
}

.event-header h2 {
Expand Down
12 changes: 12 additions & 0 deletions src/styles/in-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
height: 64px;
}

.in-common .in-common-event .event-id {
text-align: center;
display: block;
cursor: pointer;
font-size: 80%;
margin: .1rem;
}

.in-common .in-common-event.selected .event-id {
color: white;
}

.in-common .show-more {
display: inline-block;
margin-left: .5rem;
Expand Down

0 comments on commit e0c41aa

Please sign in to comment.