mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 22:14:26 +01:00
update
This commit is contained in:
@@ -27,7 +27,7 @@ const TextNoteContentDisplay = (props: TextNoteContentDisplayProps) => {
|
||||
return <PlainTextDisplay plainText={item} />;
|
||||
}
|
||||
if (item.type === 'MentionedUser') {
|
||||
return <MentionedUserDisplay mentionedUser={item} />;
|
||||
return <MentionedUserDisplay pubkey={item.pubkey} />;
|
||||
}
|
||||
if (item.type === 'MentionedEvent') {
|
||||
if (props.embedding) {
|
||||
@@ -43,6 +43,12 @@ const TextNoteContentDisplay = (props: TextNoteContentDisplayProps) => {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (item.data.type === 'npub' && props.embedding) {
|
||||
return <MentionedUserDisplay pubkey={item.data.data} />;
|
||||
}
|
||||
if (item.data.type === 'nprofile' && props.embedding) {
|
||||
return <MentionedUserDisplay pubkey={item.data.data.pubkey} />;
|
||||
}
|
||||
return <span class="text-blue-500 underline">{item.content}</span>;
|
||||
}
|
||||
if (item.type === 'HashTag') {
|
||||
@@ -61,6 +67,7 @@ const TextNoteContentDisplay = (props: TextNoteContentDisplayProps) => {
|
||||
}
|
||||
return <SafeLink class="text-blue-500 underline" href={item.content} />;
|
||||
}
|
||||
console.error('Not all ParsedTextNoteNodes are covered', item);
|
||||
return null;
|
||||
}}
|
||||
</For>
|
||||
|
||||
Reference in New Issue
Block a user