2023-07-24 18:35:05 +00:00
|
|
|
import Button from 'react-bootstrap/Button'
|
|
|
|
import InputGroup from 'react-bootstrap/InputGroup'
|
|
|
|
import Image from 'react-bootstrap/Image'
|
2021-04-22 22:14:32 +00:00
|
|
|
import Link from 'next/link'
|
|
|
|
import { useRouter } from 'next/router'
|
|
|
|
import Nav from 'react-bootstrap/Nav'
|
2022-07-21 22:55:05 +00:00
|
|
|
import { useState } from 'react'
|
2021-05-21 22:32:21 +00:00
|
|
|
import { Form, Input, SubmitButton } from './form'
|
2021-05-22 00:09:11 +00:00
|
|
|
import { gql, useApolloClient, useMutation } from '@apollo/client'
|
2021-05-25 00:08:56 +00:00
|
|
|
import styles from './user-header.module.css'
|
2021-09-24 23:04:59 +00:00
|
|
|
import { useMe } from './me'
|
2024-03-20 00:37:31 +00:00
|
|
|
import { NAME_MUTATION } from '@/fragments/users'
|
2022-04-27 19:04:00 +00:00
|
|
|
import QRCode from 'qrcode.react'
|
2024-03-20 00:37:31 +00:00
|
|
|
import LightningIcon from '@/svgs/bolt.svg'
|
|
|
|
import { encodeLNUrl } from '@/lib/lnurl'
|
2022-07-21 22:55:05 +00:00
|
|
|
import Avatar from './avatar'
|
2024-03-20 00:37:31 +00:00
|
|
|
import { userSchema } from '@/lib/validate'
|
2023-07-23 15:08:43 +00:00
|
|
|
import { useShowModal } from './modal'
|
2024-03-20 00:37:31 +00:00
|
|
|
import { numWithUnits } from '@/lib/format'
|
Allow zapping, posting and commenting without funds or an account (#336)
* Add anon zaps
* Add anon comments and posts (link, discussion, poll)
* Use payment hash instead of invoice id as proof of payment
Our invoice IDs can be enumerated.
So there is a - even though very rare - chance that an attacker could find a paid invoice which is not used yet and use it for himself.
Random payment hashes prevent this.
Also, since we delete invoices after use, using database IDs as proof of payments are not suitable.
If a user tells us an invoice ID after we deleted it, we can no longer tell if the invoice was paid or not since the LN node only knows about payment hashes but nothing about the database IDs.
* Allow pay per invoice for stackers
The modal which pops up if the stacker does not have enough sats now has two options: "fund wallet" and "pay invoice"
* Fix onSuccess called twice
For some reason, when calling `showModal`, `useMemo` in modal.js and the code for the modal component (here: <Invoice>) is called twice.
This leads to the `onSuccess` callback being called twice and one failing since the first one deletes the invoice.
* Keep invoice modal open if focus is lost
* Skip anon user during trust calculation
* Add error handling
* Skip 'invoice not found' errors
* Remove duplicate insufficient funds handling
* Fix insufficient funds error detection
* Fix invoice amount for comments
* Allow pay per invoice for bounty and job posts
* Also strike on payment after short press
* Fix unexpected token 'export'
* Fix eslint
* Remove unused id param
* Fix comment copy-paste error
* Rename to useInvoiceable
* Fix unexpected token 'export'
* Fix onConfirmation called at every render
* Add invoice HMAC
This prevents entities which know the invoice hash (like all LN nodes on the payment path) from using the invoice hash on SN.
Only the user which created the invoice knows the HMAC and thus can use the invoice hash.
* make anon posting less hidden, add anon info button explainer
* Fix anon users can't zap other anon users
* Always show repeat and contacts on action error
* Keep track of modal stack
* give anon an icon
* add generic date pivot helper
* make anon user's invoices expire in 5 minutes
* fix forgotten find and replace
* use datePivot more places
* add sat amounts to invoices
* reduce anon invoice expiration to 3 minutes
* don't abbreviate
* Fix [object Object] as error message
Any errors thrown here are already objects of shape { message: string }
* Fix empty invoice creation attempts
I stumbled across this while checking if anons can edit their items.
I monkey patched the code to make it possible (so they can see the 'edit' button) and tried to edit an item but I got this error:
Variable "$amount" of required type "Int!" was not provided.
I fixed this even though this function should never be called without an amount anyway. It will return a sane error in that case now.
* anon func mods, e.g. inv limits
* anon tips should be denormalized
* remove redundant meTotalSats
* correct overlay zap text for anon
* exclude anon from trust graph before algo runs
* remove balance limit on anon
* give anon a bio and remove cowboy hat/top stackers;
* make anon hat appear on profile
* concat hash and hmac and call it a token
* Fix localStorage cleared because error were swallowed
* fix qr layout shift
* restyle fund error modal
* Catch invoice errors in fund error modal
* invoice check backoff
* anon info typo
* make invoice expiration times have saner defaults
* add comma to anon info
* use builtin copy input label
---------
Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-11 23:50:57 +00:00
|
|
|
import Hat from './hat'
|
2023-08-29 01:27:56 +00:00
|
|
|
import SubscribeUserDropdownItem from './subscribeUser'
|
|
|
|
import ActionDropdown from './action-dropdown'
|
2024-03-20 00:37:31 +00:00
|
|
|
import CodeIcon from '@/svgs/terminal-box-fill.svg'
|
2023-09-28 20:02:25 +00:00
|
|
|
import MuteDropdownItem from './mute'
|
2023-10-06 13:24:40 +00:00
|
|
|
import copy from 'clipboard-copy'
|
|
|
|
import { useToast } from './toast'
|
2024-03-20 00:37:31 +00:00
|
|
|
import { hexToBech32 } from '@/lib/nostr'
|
|
|
|
import NostrIcon from '@/svgs/nostr.svg'
|
|
|
|
import GithubIcon from '@/svgs/github-fill.svg'
|
|
|
|
import TwitterIcon from '@/svgs/twitter-fill.svg'
|
|
|
|
import { UNKNOWN_LINK_REL, MEDIA_URL } from '@/lib/constants'
|
2021-05-22 00:09:11 +00:00
|
|
|
|
2021-04-22 22:14:32 +00:00
|
|
|
export default function UserHeader ({ user }) {
|
|
|
|
const router = useRouter()
|
2021-05-21 22:32:21 +00:00
|
|
|
|
2024-02-22 01:55:48 +00:00
|
|
|
const pathParts = router.asPath.split('/')
|
|
|
|
const activeKey = pathParts[2] === 'territories' ? 'territories' : pathParts.length === 2 ? 'bio' : 'items'
|
|
|
|
const showTerritoriesTab = activeKey === 'territories' || user.nterritories > 0
|
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<HeaderHeader user={user} />
|
|
|
|
<Nav
|
|
|
|
className={styles.nav}
|
2024-02-22 01:55:48 +00:00
|
|
|
activeKey={activeKey}
|
2023-07-23 15:08:43 +00:00
|
|
|
>
|
|
|
|
<Nav.Item>
|
|
|
|
<Link href={'/' + user.name} passHref legacyBehavior>
|
2024-02-22 01:55:48 +00:00
|
|
|
<Nav.Link eventKey='bio'>bio</Nav.Link>
|
2023-07-23 15:08:43 +00:00
|
|
|
</Link>
|
|
|
|
</Nav.Item>
|
|
|
|
<Nav.Item>
|
|
|
|
<Link href={'/' + user.name + '/all'} passHref legacyBehavior>
|
2024-02-22 01:55:48 +00:00
|
|
|
<Nav.Link eventKey='items'>
|
2023-08-08 21:31:43 +00:00
|
|
|
{numWithUnits(user.nitems, {
|
|
|
|
abbreviate: false,
|
|
|
|
unitSingular: 'item',
|
|
|
|
unitPlural: 'items'
|
|
|
|
})}
|
|
|
|
</Nav.Link>
|
2023-07-23 15:08:43 +00:00
|
|
|
</Link>
|
|
|
|
</Nav.Item>
|
2024-02-22 01:55:48 +00:00
|
|
|
{showTerritoriesTab && (
|
|
|
|
<Nav.Item>
|
|
|
|
<Link href={'/' + user.name + '/territories'} passHref legacyBehavior>
|
|
|
|
<Nav.Link eventKey='territories'>
|
|
|
|
{numWithUnits(user.nterritories, {
|
|
|
|
abbreviate: false,
|
|
|
|
unitSingular: 'territory',
|
|
|
|
unitPlural: 'territories'
|
|
|
|
})}
|
|
|
|
</Nav.Link>
|
|
|
|
</Link>
|
|
|
|
</Nav.Item>
|
|
|
|
)}
|
2023-07-23 15:08:43 +00:00
|
|
|
</Nav>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
function HeaderPhoto ({ user, isMe }) {
|
2022-07-21 22:55:05 +00:00
|
|
|
const [setPhoto] = useMutation(
|
|
|
|
gql`
|
|
|
|
mutation setPhoto($photoId: ID!) {
|
|
|
|
setPhoto(photoId: $photoId)
|
|
|
|
}`, {
|
|
|
|
update (cache, { data: { setPhoto } }) {
|
|
|
|
cache.modify({
|
|
|
|
id: `User:${user.id}`,
|
|
|
|
fields: {
|
|
|
|
photoId () {
|
|
|
|
return setPhoto
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
2024-03-13 14:04:09 +00:00
|
|
|
const src = user.photoId ? `${MEDIA_URL}/${user.photoId}` : '/dorian400.jpg'
|
2022-07-21 22:55:05 +00:00
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
return (
|
|
|
|
<div className='position-relative align-self-start' style={{ width: 'fit-content' }}>
|
|
|
|
<Image
|
2023-11-06 20:53:33 +00:00
|
|
|
src={src} width='135' height='135'
|
2023-07-23 15:08:43 +00:00
|
|
|
className={styles.userimg}
|
|
|
|
/>
|
|
|
|
{isMe &&
|
|
|
|
<Avatar onSuccess={async photoId => {
|
|
|
|
const { error } = await setPhoto({ variables: { photoId } })
|
|
|
|
if (error) {
|
|
|
|
console.log(error)
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
/>}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
2022-09-06 13:01:49 +00:00
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
function NymEdit ({ user, setEditting }) {
|
|
|
|
const router = useRouter()
|
|
|
|
const [setName] = useMutation(NAME_MUTATION, {
|
|
|
|
update (cache, { data: { setName } }) {
|
|
|
|
cache.modify({
|
|
|
|
id: `User:${user.id}`,
|
|
|
|
fields: {
|
|
|
|
name () {
|
|
|
|
return setName
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
const client = useApolloClient()
|
2023-09-26 00:54:35 +00:00
|
|
|
const schema = userSchema({ client })
|
2021-09-07 13:25:19 +00:00
|
|
|
|
2023-07-21 22:33:11 +00:00
|
|
|
return (
|
2023-07-23 15:08:43 +00:00
|
|
|
<Form
|
|
|
|
schema={schema}
|
|
|
|
initial={{
|
|
|
|
name: user.name
|
|
|
|
}}
|
|
|
|
validateImmediately
|
2023-08-09 22:06:22 +00:00
|
|
|
validateOnChange={false}
|
2023-07-23 15:08:43 +00:00
|
|
|
onSubmit={async ({ name }) => {
|
|
|
|
if (name === user.name) {
|
|
|
|
setEditting(false)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
const { error } = await setName({ variables: { name } })
|
|
|
|
if (error) {
|
|
|
|
throw new Error({ message: error.toString() })
|
|
|
|
}
|
2023-07-21 22:33:11 +00:00
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
setEditting(false)
|
|
|
|
// navigate to new name
|
|
|
|
const { nodata, ...query } = router.query
|
|
|
|
router.replace({
|
|
|
|
pathname: router.pathname,
|
|
|
|
query: { ...query, name }
|
|
|
|
}, undefined, { shallow: true })
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<div className='d-flex align-items-center mb-2'>
|
|
|
|
<Input
|
|
|
|
prepend=<InputGroup.Text>@</InputGroup.Text>
|
|
|
|
name='name'
|
|
|
|
autoFocus
|
|
|
|
groupClassName={styles.usernameForm}
|
|
|
|
showValid
|
2023-08-09 22:06:22 +00:00
|
|
|
debounce={500}
|
2023-07-23 15:08:43 +00:00
|
|
|
/>
|
|
|
|
<SubmitButton variant='link' onClick={() => setEditting(true)}>save</SubmitButton>
|
|
|
|
</div>
|
|
|
|
</Form>
|
|
|
|
)
|
|
|
|
}
|
2023-07-21 22:33:11 +00:00
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
function NymView ({ user, isMe, setEditting }) {
|
2023-08-29 01:27:56 +00:00
|
|
|
const me = useMe()
|
2023-07-23 15:08:43 +00:00
|
|
|
return (
|
|
|
|
<div className='d-flex align-items-center mb-2'>
|
Allow zapping, posting and commenting without funds or an account (#336)
* Add anon zaps
* Add anon comments and posts (link, discussion, poll)
* Use payment hash instead of invoice id as proof of payment
Our invoice IDs can be enumerated.
So there is a - even though very rare - chance that an attacker could find a paid invoice which is not used yet and use it for himself.
Random payment hashes prevent this.
Also, since we delete invoices after use, using database IDs as proof of payments are not suitable.
If a user tells us an invoice ID after we deleted it, we can no longer tell if the invoice was paid or not since the LN node only knows about payment hashes but nothing about the database IDs.
* Allow pay per invoice for stackers
The modal which pops up if the stacker does not have enough sats now has two options: "fund wallet" and "pay invoice"
* Fix onSuccess called twice
For some reason, when calling `showModal`, `useMemo` in modal.js and the code for the modal component (here: <Invoice>) is called twice.
This leads to the `onSuccess` callback being called twice and one failing since the first one deletes the invoice.
* Keep invoice modal open if focus is lost
* Skip anon user during trust calculation
* Add error handling
* Skip 'invoice not found' errors
* Remove duplicate insufficient funds handling
* Fix insufficient funds error detection
* Fix invoice amount for comments
* Allow pay per invoice for bounty and job posts
* Also strike on payment after short press
* Fix unexpected token 'export'
* Fix eslint
* Remove unused id param
* Fix comment copy-paste error
* Rename to useInvoiceable
* Fix unexpected token 'export'
* Fix onConfirmation called at every render
* Add invoice HMAC
This prevents entities which know the invoice hash (like all LN nodes on the payment path) from using the invoice hash on SN.
Only the user which created the invoice knows the HMAC and thus can use the invoice hash.
* make anon posting less hidden, add anon info button explainer
* Fix anon users can't zap other anon users
* Always show repeat and contacts on action error
* Keep track of modal stack
* give anon an icon
* add generic date pivot helper
* make anon user's invoices expire in 5 minutes
* fix forgotten find and replace
* use datePivot more places
* add sat amounts to invoices
* reduce anon invoice expiration to 3 minutes
* don't abbreviate
* Fix [object Object] as error message
Any errors thrown here are already objects of shape { message: string }
* Fix empty invoice creation attempts
I stumbled across this while checking if anons can edit their items.
I monkey patched the code to make it possible (so they can see the 'edit' button) and tried to edit an item but I got this error:
Variable "$amount" of required type "Int!" was not provided.
I fixed this even though this function should never be called without an amount anyway. It will return a sane error in that case now.
* anon func mods, e.g. inv limits
* anon tips should be denormalized
* remove redundant meTotalSats
* correct overlay zap text for anon
* exclude anon from trust graph before algo runs
* remove balance limit on anon
* give anon a bio and remove cowboy hat/top stackers;
* make anon hat appear on profile
* concat hash and hmac and call it a token
* Fix localStorage cleared because error were swallowed
* fix qr layout shift
* restyle fund error modal
* Catch invoice errors in fund error modal
* invoice check backoff
* anon info typo
* make invoice expiration times have saner defaults
* add comma to anon info
* use builtin copy input label
---------
Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-11 23:50:57 +00:00
|
|
|
<div className={styles.username}>@{user.name}<Hat className='' user={user} badge /></div>
|
2023-07-23 15:08:43 +00:00
|
|
|
{isMe &&
|
|
|
|
<Button className='py-0' style={{ lineHeight: '1.25' }} variant='link' onClick={() => setEditting(true)}>edit nym</Button>}
|
2024-04-04 00:38:47 +00:00
|
|
|
{!isMe && me && <NymActionDropdown user={user} />}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function NymActionDropdown ({ user, className = 'ms-2' }) {
|
|
|
|
return (
|
|
|
|
<div className={className}>
|
|
|
|
<ActionDropdown>
|
|
|
|
<SubscribeUserDropdownItem user={user} target='posts' />
|
|
|
|
<SubscribeUserDropdownItem user={user} target='comments' />
|
|
|
|
<MuteDropdownItem user={user} />
|
|
|
|
</ActionDropdown>
|
2023-07-23 15:08:43 +00:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
2023-07-21 22:33:11 +00:00
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
function HeaderNym ({ user, isMe }) {
|
|
|
|
const [editting, setEditting] = useState(false)
|
|
|
|
|
|
|
|
return editting
|
|
|
|
? <NymEdit user={user} setEditting={setEditting} />
|
|
|
|
: <NymView user={user} isMe={isMe} setEditting={setEditting} />
|
|
|
|
}
|
|
|
|
|
2024-02-14 19:33:31 +00:00
|
|
|
function SocialLink ({ name, id }) {
|
|
|
|
const className = `${styles.social} text-reset`
|
|
|
|
if (name === 'Nostr') {
|
|
|
|
const npub = hexToBech32(id)
|
|
|
|
return (
|
2024-03-05 01:20:14 +00:00
|
|
|
// eslint-disable-next-line
|
2024-04-28 22:25:25 +00:00
|
|
|
<Link className={className} target='_blank' href={`https://njump.me/${npub}`} rel={UNKNOWN_LINK_REL}>
|
2024-02-14 19:33:31 +00:00
|
|
|
<NostrIcon width={20} height={20} className='me-1' />
|
|
|
|
{npub.slice(0, 10)}...{npub.slice(-10)}
|
|
|
|
</Link>
|
|
|
|
)
|
|
|
|
} else if (name === 'Github') {
|
|
|
|
return (
|
2024-03-05 01:20:14 +00:00
|
|
|
// eslint-disable-next-line
|
|
|
|
<Link className={className} target='_blank' href={`https://github.com/${id}`} rel={UNKNOWN_LINK_REL}>
|
2024-02-14 19:33:31 +00:00
|
|
|
<GithubIcon width={20} height={20} className='me-1' />
|
|
|
|
{id}
|
|
|
|
</Link>
|
|
|
|
)
|
|
|
|
} else if (name === 'Twitter') {
|
|
|
|
return (
|
2024-03-05 01:20:14 +00:00
|
|
|
// eslint-disable-next-line
|
|
|
|
<Link className={className} target='_blank' href={`https://twitter.com/${id}`} rel={UNKNOWN_LINK_REL}>
|
2024-02-14 19:33:31 +00:00
|
|
|
<TwitterIcon width={20} height={20} className='me-1' />
|
|
|
|
@{id}
|
|
|
|
</Link>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
function HeaderHeader ({ user }) {
|
|
|
|
const me = useMe()
|
2024-02-14 19:33:31 +00:00
|
|
|
|
2023-07-23 15:08:43 +00:00
|
|
|
const showModal = useShowModal()
|
2023-10-06 13:24:40 +00:00
|
|
|
const toaster = useToast()
|
2023-07-23 15:08:43 +00:00
|
|
|
|
|
|
|
const isMe = me?.name === user.name
|
2023-09-18 23:09:08 +00:00
|
|
|
const Satistics = () => (
|
2023-11-10 01:05:35 +00:00
|
|
|
user.optional.stacked !== null &&
|
|
|
|
<div className={`mb-2 ms-0 ms-sm-1 ${styles.username} text-success`}>
|
|
|
|
{numWithUnits(user.optional.stacked, { abbreviate: false, format: true })} stacked
|
|
|
|
</div>
|
|
|
|
)
|
2023-07-23 15:08:43 +00:00
|
|
|
|
2024-04-08 22:54:39 +00:00
|
|
|
const lnurlp = encodeLNUrl(new URL(`${process.env.NEXT_PUBLIC_URL}/.well-known/lnurlp/${user.name}`))
|
2023-07-23 15:08:43 +00:00
|
|
|
return (
|
|
|
|
<div className='d-flex mt-2 flex-wrap flex-column flex-sm-row'>
|
|
|
|
<HeaderPhoto user={user} isMe={isMe} />
|
2023-07-24 18:35:05 +00:00
|
|
|
<div className='ms-0 ms-sm-3 mt-3 mt-sm-0 justify-content-center align-self-sm-center'>
|
2023-07-23 15:08:43 +00:00
|
|
|
<HeaderNym user={user} isMe={isMe} />
|
|
|
|
<Satistics user={user} />
|
|
|
|
<Button
|
2023-07-24 18:35:05 +00:00
|
|
|
className='fw-bold ms-0' onClick={() => {
|
2023-10-06 13:24:40 +00:00
|
|
|
copy(`${user.name}@stacker.news`)
|
|
|
|
.then(() => {
|
|
|
|
toaster.success(`copied ${user.name}@stacker.news to clipboard`)
|
|
|
|
}).catch(() => {
|
|
|
|
toaster.error(`failed to copy ${user.name}@stacker.news to clipboard`)
|
|
|
|
})
|
2023-07-23 15:08:43 +00:00
|
|
|
showModal(({ onClose }) => (
|
|
|
|
<>
|
2023-10-26 15:36:46 +00:00
|
|
|
<a className='d-flex m-auto p-3' style={{ background: 'white', maxWidth: 'fit-content' }} href={`lightning:${lnurlp}`}>
|
2023-07-23 15:08:43 +00:00
|
|
|
<QRCode className='d-flex m-auto' value={lnurlp} renderAs='svg' size={300} />
|
|
|
|
</a>
|
2023-07-24 18:35:05 +00:00
|
|
|
<div className='text-center fw-bold text-muted mt-3'>click or scan</div>
|
2023-07-23 15:08:43 +00:00
|
|
|
</>
|
|
|
|
))
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<LightningIcon
|
|
|
|
width={20}
|
|
|
|
height={20}
|
2023-07-24 18:35:05 +00:00
|
|
|
className='me-1'
|
2023-07-23 15:08:43 +00:00
|
|
|
/>{user.name}@stacker.news
|
|
|
|
</Button>
|
2023-07-24 18:35:05 +00:00
|
|
|
<div className='d-flex flex-column mt-1 ms-0'>
|
2023-07-23 15:08:43 +00:00
|
|
|
<small className='text-muted d-flex-inline'>stacking since: {user.since
|
2023-07-24 18:35:05 +00:00
|
|
|
? <Link href={`/items/${user.since}`} className='ms-1'>#{user.since}</Link>
|
2023-07-23 15:08:43 +00:00
|
|
|
: <span>never</span>}
|
|
|
|
</small>
|
2024-02-14 19:33:31 +00:00
|
|
|
{user.optional.maxStreak !== null &&
|
|
|
|
<small className='text-muted d-flex-inline'>longest cowboy streak: {user.optional.maxStreak}</small>}
|
|
|
|
{user.optional.isContributor &&
|
|
|
|
<small className='text-muted d-flex align-items-center'>
|
|
|
|
<CodeIcon className='me-1' height={16} width={16} /> verified stacker.news contributor
|
|
|
|
</small>}
|
2024-02-16 19:15:00 +00:00
|
|
|
{user.optional.nostrAuthPubkey &&
|
2024-02-14 19:33:31 +00:00
|
|
|
<small className='text-muted d-flex-inline'>
|
|
|
|
<SocialLink name='Nostr' id={user.optional.nostrAuthPubkey} />
|
|
|
|
</small>}
|
2024-02-16 19:15:00 +00:00
|
|
|
{user.optional.githubId &&
|
2024-02-14 19:33:31 +00:00
|
|
|
<small className='text-muted d-flex-inline'>
|
|
|
|
<SocialLink name='Github' id={user.optional.githubId} />
|
|
|
|
</small>}
|
2024-02-16 19:26:15 +00:00
|
|
|
{user.optional.twitterId &&
|
2024-02-14 19:33:31 +00:00
|
|
|
<small className='text-muted d-flex-inline'>
|
|
|
|
<SocialLink name='Twitter' id={user.optional.twitterId} />
|
|
|
|
</small>}
|
2022-04-27 19:04:00 +00:00
|
|
|
</div>
|
2021-09-23 17:42:00 +00:00
|
|
|
</div>
|
2023-07-23 15:08:43 +00:00
|
|
|
</div>
|
2021-04-22 22:14:32 +00:00
|
|
|
)
|
|
|
|
}
|