Show UserMenu even if no avatar available
This commit is contained in:
@@ -36,7 +36,7 @@ interface UserMenuProps {
|
|||||||
isAuthenticated: boolean;
|
isAuthenticated: boolean;
|
||||||
isPasswordlessUser: boolean;
|
isPasswordlessUser: boolean;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
avatarUrl: string;
|
avatarUrl?: string;
|
||||||
onAction: (value: string) => void;
|
onAction: (value: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,18 +61,14 @@ export function UserMenuContainer({ preventNavigation = false }: Props) {
|
|||||||
const userName = client?.getUserIdLocalpart() ?? "";
|
const userName = client?.getUserIdLocalpart() ?? "";
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{avatarUrl && (
|
<UserMenu
|
||||||
<UserMenu
|
preventNavigation={preventNavigation}
|
||||||
preventNavigation={preventNavigation}
|
isAuthenticated={authenticated}
|
||||||
isAuthenticated={authenticated}
|
isPasswordlessUser={passwordlessUser}
|
||||||
isPasswordlessUser={passwordlessUser}
|
avatarUrl={avatarUrl}
|
||||||
avatarUrl={avatarUrl}
|
onAction={onAction}
|
||||||
onAction={onAction}
|
displayName={displayName || (userName ? userName.replace("@", "") : "")}
|
||||||
displayName={
|
/>
|
||||||
displayName || (userName ? userName.replace("@", "") : "")
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{modalState.isOpen && client && (
|
{modalState.isOpen && client && (
|
||||||
<SettingsModal
|
<SettingsModal
|
||||||
client={client}
|
client={client}
|
||||||
|
|||||||
Reference in New Issue
Block a user