Skip to content

Commit

Permalink
Merge pull request #41 from poap-xyz/release/v1.2.3
Browse files Browse the repository at this point in the history
Release v1.2.3
  • Loading branch information
jm42 authored May 25, 2023
2 parents 172da9f + 3850e3f commit 6cc600e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 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.2.2",
"version": "1.2.3",
"author": {
"name": "POAP",
"url": "https://poap.xyz"
Expand Down
17 changes: 3 additions & 14 deletions src/components/EventCount.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import TokenImage from './TokenImage'
import '../styles/event-count.css'

function EventCount({ event, count, linkToGallery = false }) {
function EventCount({ event, count, size = 64 }) {
return (
<div className="event-count">
{linkToGallery &&
<a href={`https://poap.gallery/event/${event.id}`} title={event.name}>
<TokenImage event={event} size={64} />
<span className="count">{count}</span>
</a>
}
{!linkToGallery &&
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a id={`event-${event.id}`} title={event.name}>
<TokenImage event={event} size={64} />
<span className="count">{count}</span>
</a>
}
<TokenImage event={event} size={size} />
<span className="count">{count}</span>
</div>
)
}
Expand Down
31 changes: 18 additions & 13 deletions src/components/InCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,25 @@ function InCommon({
<div className={`in-common-events${showAll ? ' show-all' : ''}`}>
{inCommonEntries.map(
([eventId, addresses]) => (
<button
key={eventId}
className={`event-button${activeEventIds.indexOf(eventId) !== -1 ? ' selected' : ''}${showCount > 0 && showCount === addresses.length ? ' perfect' : ''}`}
onClick={() => toggleActiveEventId(eventId)}
<div
className={`in-common-event${activeEventIds.indexOf(eventId) !== -1 ? ' selected' : ''}${showCount > 0 && showCount === addresses.length ? ' perfect' : ''}`}
title={events[eventId].name}
>
{showCount > 0 && showCount === addresses.length
? (
<div className="event-image">
<TokenImage event={events[eventId]} size={64} />
</div>
)
: <EventCount event={events[eventId]} count={addresses.length} />
}
</button>
<button
key={eventId}
className="event-button"
onClick={() => toggleActiveEventId(eventId)}
>
{showCount > 0 && showCount === addresses.length
? (
<div className="event-image">
<TokenImage event={events[eventId]} size={64} />
</div>
)
: <EventCount event={events[eventId]} count={addresses.length} size={64} />
}
</button>
</div>
)
)}
{hasMore && (
Expand Down
17 changes: 12 additions & 5 deletions src/styles/in-common.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
.in-common .event-button {
background: transparent;
border-width: 0;
cursor: pointer;
}

.in-common .in-common-event {
display: inline-block;
border: .1rem solid transparent;
border-radius: 12px;
cursor: pointer;
margin: .1rem;
margin: .2rem;
overflow-wrap: break-word;
width: 72px;
}

.in-common .show-all .event-button.perfect {
.in-common .show-all .in-common-event.perfect {
background-color: #eee;
border-color: #cdcdcd;
}

.in-common .event-button.selected {
.in-common .in-common-event.selected {
background-color: #7d73e2 !important;
border-color: #473e6b !important;
}

.in-common .event-button .event-image {
.in-common .in-common-event .event-image {
display: inline-block;
margin: 4px;
width: 64px;
Expand Down
5 changes: 2 additions & 3 deletions src/styles/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
@media only screen and (min-width: 1024px) {
.page-aside {
position: inherit;
margin-top: .5rem;
margin-right: 1rem;
margin: .5rem 1rem 0 0;
}
.page-content {
width: calc(100% - 4.2rem);
width: calc(100% - 5.2rem);
}
.logo-menu-card {
background-color: transparent !important;
Expand Down

0 comments on commit 6cc600e

Please sign in to comment.