Skip to content

Commit

Permalink
cleanup; fix UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Soxasora committed Feb 4, 2025
1 parent 0cf7699 commit d1fc5a7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions components/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,17 +528,18 @@ function WithdrawlPaid ({ n }) {
}

function Referral ({ n }) {
let referralSource
let referralSource = 'of you'
if (n.source.item) referralSource = 'you shared this post'
if (n.source.sub) referralSource = 'you shared ~' + n.source.sub.name + ' territory'
if (n.source.profile) referralSource = 'you shared ' + n.source.profile.name + '\'s profile'
if (!referralSource) referralSource = 'of you'
return (
<small className='fw-bold text-success'>
<UserAdd className='fill-success me-2' height={21} width={21} style={{ transform: 'rotateY(180deg)' }} />someone joined SN because {referralSource}
<small className='text-muted ms-1 fw-normal' suppressHydrationWarning>{timeSince(new Date(n.sortTime))}</small>
{n.source.item && <NoteItem item={n.source.item} />}
</small>
<>
<small className='fw-bold text-success'>
<UserAdd className='fill-success me-2' height={21} width={21} style={{ transform: 'rotateY(180deg)' }} />someone joined SN because {referralSource}
<small className='text-muted ms-1 fw-normal' suppressHydrationWarning>{timeSince(new Date(n.sortTime))}</small>
</small>
{n.source.item && <NoteItem itemClassName='ms-1 pt-2' item={n.source.item} />}
</>
)
}

Expand Down

0 comments on commit d1fc5a7

Please sign in to comment.