Refactor + add message box.

This commit is contained in:
Paul
2021-06-20 20:30:42 +01:00
parent b8fba749af
commit 9e460c5b3d
28 changed files with 225 additions and 120 deletions

View File

@@ -0,0 +1,14 @@
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 default function UserShort({ user }: { user?: User }) {
return <>
<UserIcon size={24} target={user} />
<Username user={user} />
</>;
}