feat: custom emoji
This commit is contained in:
parent
481d6a1447
commit
71d4420604
46 changed files with 885 additions and 176 deletions
|
|
@ -1,17 +0,0 @@
|
|||
import { useFetchProfile } from '@/hooks'
|
||||
import { formatUserId } from '@/lib/pubkey'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { NodeViewRendererProps, NodeViewWrapper } from '@tiptap/react'
|
||||
|
||||
export default function MentionNode(props: NodeViewRendererProps & { selected: boolean }) {
|
||||
const { profile } = useFetchProfile(props.node.attrs.id)
|
||||
|
||||
return (
|
||||
<NodeViewWrapper
|
||||
className={cn('inline text-primary', props.selected ? 'bg-primary/20 rounded-sm' : '')}
|
||||
>
|
||||
{'@'}
|
||||
{profile ? profile.username : formatUserId(props.node.attrs.id)}
|
||||
</NodeViewWrapper>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue