Use njump.me for nostr links (#1120)

njump is what is powering the preview in nostr.com so it seems more fitting to directly go to njump.me

See https://github.com/fiatjaf/njump
This commit is contained in:
ekzyis 2024-04-28 17:25:25 -05:00 committed by GitHub
parent ccc9cefb68
commit bd37ec17cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -54,7 +54,7 @@ const SocialsPopover = (
<Popover> <Popover>
<Popover.Body style={{ fontWeight: 500, fontSize: '.9rem' }}> <Popover.Body style={{ fontWeight: 500, fontSize: '.9rem' }}>
<a <a
href='https://snort.social/p/npub1jfujw6llhq7wuvu5detycdsq5v5yqf56sgrdq8wlgrryx2a2p09svwm0gx' className='nav-link p-0 d-inline-flex' href='https://njump.me/npub1jfujw6llhq7wuvu5detycdsq5v5yqf56sgrdq8wlgrryx2a2p09svwm0gx' className='nav-link p-0 d-inline-flex'
target='_blank' rel='noreferrer' target='_blank' rel='noreferrer'
> >
nostr nostr

View File

@ -160,7 +160,7 @@ export default function ItemInfo ({
opentimestamp opentimestamp
</Link>} </Link>}
{item?.noteId && ( {item?.noteId && (
<Dropdown.Item onClick={() => window.open(`https://nostr.com/${item.noteId}`, '_blank', 'noopener,noreferrer,nofollow')}> <Dropdown.Item onClick={() => window.open(`https://njump.me/${item.noteId}`, '_blank', 'noopener,noreferrer,nofollow')}>
nostr note nostr note
</Dropdown.Item> </Dropdown.Item>
)} )}

View File

@ -235,14 +235,14 @@ function NostrZap ({ n }) {
<div className='fw-bold text-nostr ms-2 py-1'> <div className='fw-bold text-nostr ms-2 py-1'>
<NostrIcon width={24} height={24} className='fill-nostr me-1' />{numWithUnits(n.earnedSats)} zap from <NostrIcon width={24} height={24} className='fill-nostr me-1' />{numWithUnits(n.earnedSats)} zap from
{// eslint-disable-next-line {// eslint-disable-next-line
<Link className='mx-1 text-reset text-underline' target='_blank' href={`https://snort.social/p/${npub}`} rel={UNKNOWN_LINK_REL}> <Link className='mx-1 text-reset text-underline' target='_blank' href={`https://njump.me/${npub}`} rel={UNKNOWN_LINK_REL}>
{npub.slice(0, 10)}... {npub.slice(0, 10)}...
</Link> </Link>
} }
on {note on {note
? ( ? (
// eslint-disable-next-line // eslint-disable-next-line
<Link className='mx-1 text-reset text-underline' target='_blank' href={`https://snort.social/e/${note}`} rel={UNKNOWN_LINK_REL}> <Link className='mx-1 text-reset text-underline' target='_blank' href={`https://njump.me/${note}`} rel={UNKNOWN_LINK_REL}>
{note.slice(0, 12)}... {note.slice(0, 12)}...
</Link>) </Link>)
: 'nostr'} : 'nostr'}

View File

@ -213,7 +213,7 @@ function SocialLink ({ name, id }) {
const npub = hexToBech32(id) const npub = hexToBech32(id)
return ( return (
// eslint-disable-next-line // eslint-disable-next-line
<Link className={className} target='_blank' href={`https://nostr.com/${npub}`} rel={UNKNOWN_LINK_REL}> <Link className={className} target='_blank' href={`https://njump.me/${npub}`} rel={UNKNOWN_LINK_REL}>
<NostrIcon width={20} height={20} className='me-1' /> <NostrIcon width={20} height={20} className='me-1' />
{npub.slice(0, 10)}...{npub.slice(-10)} {npub.slice(0, 10)}...{npub.slice(-10)}
</Link> </Link>