feat: 💨
This commit is contained in:
parent
63869ef3b7
commit
6571468150
19 changed files with 55 additions and 28 deletions
17
src/components/ClientTag/index.tsx
Normal file
17
src/components/ClientTag/index.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { getUsingClient } from '@/lib/event'
|
||||
import { NostrEvent } from 'nostr-tools'
|
||||
import { useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export default function ClientTag({ event }: { event: NostrEvent }) {
|
||||
const { t } = useTranslation()
|
||||
const usingClient = useMemo(() => getUsingClient(event), [event])
|
||||
|
||||
if (!usingClient) return null
|
||||
|
||||
return (
|
||||
<span className="text-sm text-muted-foreground shrink-0">
|
||||
{t('via {{client}}', { client: usingClient })}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue