feat: better error handler

This commit is contained in:
2024-01-16 19:56:07 +07:00
parent 1503d90bd5
commit 33dd8b1d8a
3 changed files with 28 additions and 25 deletions

View File

@@ -26,7 +26,6 @@ export const MentionNote = memo(function MentionNote({
}
if (isError || !data) {
console.log(eventId);
return (
<div
contentEditable={false}

View File

@@ -22,7 +22,7 @@ export const MentionUser = memo(function MentionUser({
? "@anon"
: isError
? pubkey
: `@${user.name || user.displayName || user.username || "anon"}`}
: `@${user?.name || user?.displayName || user?.username || "anon"}`}
</DropdownMenu.Trigger>
<DropdownMenu.Content className="left-[50px] z-50 relative flex w-[200px] flex-col overflow-hidden rounded-xl border border-neutral-200 bg-neutral-950 focus:outline-none dark:border-neutral-900">
<DropdownMenu.Item asChild>