succint zaps display

This commit is contained in:
Alejandro Gomez 2023-02-04 16:25:37 +01:00
parent 529074e0c6
commit b8e58dbdd4
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
2 changed files with 17 additions and 21 deletions

View File

@ -17,8 +17,7 @@
.zap .summary {
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row;
}
.zap .amount {
@ -33,12 +32,15 @@
content: '';
}
.top-zap .summary {
color: var(--font-secondary-color);
}
.zaps-summary {
margin-top: 8px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-left: 52px;
}
.top-zap {
@ -51,13 +53,6 @@
margin-right: .3em;
}
.top-zap .summary {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.top-zap .avatar {
width: 21px;
height: 21px;
@ -67,6 +62,12 @@
display: none;
}
.top-zap .summary {
display: flex;
flex-direction: row;
align-items: center;
}
.amount-number {
font-weight: bold;
}

View File

@ -125,10 +125,11 @@ export const ZapsSummary = ({ zaps }: ZapsSummaryProps) => {
{amount && (
<div className={`top-zap`}>
<div className="summary">
{zapper ? <ProfileImage pubkey={zapper} /> : <div>Anon&nbsp;</div>}
<div className="amount">
zapped <span className="amount-number">{formatShort(amount)}</span> sats
</div>
{zapper && <ProfileImage pubkey={zapper} />}
{restZaps.length > 0 && (
<span>and {restZaps.length} other{restZaps.length > 1 ? 's' : ''}</span>
)}
<span>&nbsp;zapped</span>
</div>
<div className="body">
{content && (
@ -142,12 +143,6 @@ export const ZapsSummary = ({ zaps }: ZapsSummaryProps) => {
</div>
</div>
)}
{restZapsTotal > 0 && (
<div className="rest-zaps">
{restZaps.length} other{restZaps.length > 1 ? 's' : ''} zapped&nbsp;
<span className="amount-number">{formatShort(restZapsTotal)}</span> sats
</div>
)}
</div>
)
}