migrate to cv2 jsx
This commit is contained in:
parent
6858283ecc
commit
dcd22a9d8c
18 changed files with 101 additions and 122 deletions
24
src/components/User.tsx
Normal file
24
src/components/User.tsx
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { Section } from "components-jsx/Section";
|
||||
import { client } from "..";
|
||||
import { Thumbnail } from "components-jsx/Thumbnail";
|
||||
import { TextDisplay } from "components-jsx/TextDisplay";
|
||||
import { br } from "components-jsx/br";
|
||||
|
||||
export async function User(props: { id: string }) {
|
||||
const user = await client.rest.users.get(props.id);
|
||||
|
||||
return (
|
||||
<Section
|
||||
accessory={
|
||||
<Thumbnail children={{ url: user.avatarURL("png", 128) }} />
|
||||
}
|
||||
>
|
||||
<TextDisplay>### User</TextDisplay>
|
||||
<TextDisplay>
|
||||
{user.globalName || user.username}
|
||||
<br />
|
||||
-# @{user.username}
|
||||
</TextDisplay>
|
||||
</Section>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue