Release v4.1 (#229)
* refactor: remove custom icon packs * fix: command not work on windows * fix: make open_window command async * feat: improve commands * feat: improve * refactor: column * feat: improve thread column * feat: improve * feat: add stories column * feat: improve * feat: add search column * feat: add reset password * feat: add subscription * refactor: settings * chore: improve commands * fix: crash on production * feat: use tauri store plugin for cache * feat: new icon * chore: update icon for windows * chore: improve some columns * chore: polish code
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { displayNpub } from "@/commons";
|
||||
import { LumeWindow, useProfile } from "@/system";
|
||||
import { memo } from "react";
|
||||
|
||||
export function MentionUser({ pubkey }: { pubkey: string }) {
|
||||
export const MentionUser = memo(function MentionUser({
|
||||
pubkey,
|
||||
}: { pubkey: string }) {
|
||||
const { isLoading, isError, profile } = useProfile(pubkey);
|
||||
|
||||
return (
|
||||
@@ -14,7 +17,7 @@ export function MentionUser({ pubkey }: { pubkey: string }) {
|
||||
? "@anon"
|
||||
: isError
|
||||
? displayNpub(pubkey, 16)
|
||||
: `@${profile?.name || profile?.display_name || "anon"}`}
|
||||
: `@${profile?.name || profile?.display_name || displayNpub(pubkey, 16)}`}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user