Skip to content

Commit

Permalink
feat: use Avatar component and remove non null assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
zamitto committed Jan 15, 2025
1 parent 56fabb2 commit 15f721a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
7 changes: 0 additions & 7 deletions src/renderer/src/pages/settings/settings-account.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/src/pages/settings/settings-account.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 15f721a

Please sign in to comment.