suppress hydration warnings when relative time is rendered

This commit is contained in:
keyan 2023-07-31 09:12:56 -05:00
parent 10e8cb35df
commit bc5a19c6ee
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ export default function ItemJob ({ item, toc, rank, children }) {
@{item.user.name}<CowboyHat className='ms-1 fill-grey' user={item.user} height={12} width={12} /> @{item.user.name}<CowboyHat className='ms-1 fill-grey' user={item.user} height={12} width={12} />
</Link> </Link>
<span> </span> <span> </span>
<Link href={`/items/${item.id}`} title={item.createdAt} className='text-reset'> <Link href={`/items/${item.id}`} title={item.createdAt} className='text-reset' suppressHydrationWarning>
{timeSince(new Date(item.createdAt))} {timeSince(new Date(item.createdAt))}
</Link> </Link>
</span> </span>

View File

@ -126,7 +126,7 @@ function EarnNotification ({ n }) {
<HandCoin className='align-self-center fill-boost mx-1' width={24} height={24} style={{ flex: '0 0 24px', transform: 'rotateY(180deg)' }} /> <HandCoin className='align-self-center fill-boost mx-1' width={24} height={24} style={{ flex: '0 0 24px', transform: 'rotateY(180deg)' }} />
<div className='ms-2'> <div className='ms-2'>
<div className='fw-bold text-boost'> <div className='fw-bold text-boost'>
you stacked {n.earnedSats} sats in rewards<small className='text-muted ms-1 fw-normal'>{timeSince(new Date(n.sortTime))}</small> you stacked {n.earnedSats} sats in rewards<small className='text-muted ms-1 fw-normal' suppressHydrationWarning>{timeSince(new Date(n.sortTime))}</small>
</div> </div>
{n.sources && {n.sources &&
<div style={{ fontSize: '80%', color: 'var(--theme-grey)' }}> <div style={{ fontSize: '80%', color: 'var(--theme-grey)' }}>
@ -166,7 +166,7 @@ function InvoicePaid ({ n }) {
<NotificationLayout href={`/invoices/${n.invoice.id}`}> <NotificationLayout href={`/invoices/${n.invoice.id}`}>
<div className='fw-bold text-info ms-2 py-1'> <div className='fw-bold text-info ms-2 py-1'>
<Check className='fill-info me-1' />{n.earnedSats} sats were deposited in your account <Check className='fill-info me-1' />{n.earnedSats} sats were deposited in your account
<small className='text-muted ms-1 fw-normal'>{timeSince(new Date(n.sortTime))}</small> <small className='text-muted ms-1 fw-normal' suppressHydrationWarning>{timeSince(new Date(n.sortTime))}</small>
</div> </div>
</NotificationLayout> </NotificationLayout>
) )
@ -177,7 +177,7 @@ function Referral ({ n }) {
<NotificationLayout> <NotificationLayout>
<small className='fw-bold text-secondary ms-2'> <small className='fw-bold text-secondary ms-2'>
someone joined via one of your <Link href='/referrals/month' className='text-reset'>referral links</Link> someone joined via one of your <Link href='/referrals/month' className='text-reset'>referral links</Link>
<small className='text-muted ms-1 fw-normal'>{timeSince(new Date(n.sortTime))}</small> <small className='text-muted ms-1 fw-normal' suppressHydrationWarning>{timeSince(new Date(n.sortTime))}</small>
</small> </small>
</NotificationLayout> </NotificationLayout>
) )