Fix: Emojis showing through spoilers.

Fix: Copy ID copies wrong ID.
Messaging: Add context menu to avatar / username.
This commit is contained in:
Paul
2021-06-24 16:43:37 +01:00
parent 363789c825
commit 3393795817
7 changed files with 34 additions and 11 deletions

View File

@@ -2,8 +2,8 @@ import { User } from "revolt.js";
import UserIcon from "./UserIcon";
import { Text } from "preact-i18n";
export function Username({ user }: { user?: User }) {
return <b>{ user?.username ?? <Text id="app.main.channel.unknown_user" /> }</b>;
export function Username({ user, ...otherProps }: { user?: User } & JSX.HTMLAttributes<HTMLElement>) {
return <b {...otherProps}>{ user?.username ?? <Text id="app.main.channel.unknown_user" /> }</b>;
}
export default function UserShort({ user, size }: { user?: User, size?: number }) {