feat: use Avatar component and remove non null assertion

This commit is contained in:
Zamitto 2025-01-15 17:11:02 -03:00
parent 56fabb2881
commit 15f721ac39
2 changed files with 5 additions and 11 deletions

View File

@ -8,13 +8,6 @@ export const form = style({
gap: `${SPACING_UNIT}px`,
});
export const blockedUserAvatar = style({
width: "32px",
height: "32px",
borderRadius: "4px",
filter: "grayscale(100%)",
});
export const blockedUser = style({
display: "flex",
minWidth: "240px",

View File

@ -1,4 +1,4 @@
import { Button, SelectField } from "@renderer/components";
import { Avatar, Button, SelectField } from "@renderer/components";
import { SPACING_UNIT } from "@renderer/theme.css";
import { Controller, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
@ -201,10 +201,11 @@ export function SettingsAccount() {
alignItems: "center",
}}
>
<img
src={user.profileImageUrl!}
<Avatar
style={{ filter: "grayscale(100%)" }}
size={32}
src={user.profileImageUrl}
alt={user.displayName}
className={styles.blockedUserAvatar}
/>
<span>{user.displayName}</span>
</div>