fix: no avatar handling

This commit is contained in:
2025-06-30 00:08:25 +02:00
parent 0c24ed9382
commit 533e6ea6af
7 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ import { useMemo, type FC } from "react";
export interface AvatarProps {
iconSize?: number;
className?: string;
avatarId?: string;
avatarId?: string | null;
}
const Avatar: FC<AvatarProps> = ({ iconSize = 32, className, avatarId }) => {

View File

@ -45,7 +45,7 @@ const RolesGroup: FC<IPermissionGroupProps> = ({ scope, roles }) => {
</ol>
{index + 1 < roles.length && (
<div className="h-0.5 bg-gray-700 w-full rounded my-6"></div>
<div className="h-[1px] bg-gray-700 w-full rounded my-6"></div>
)}
</div>
))}

View File

@ -113,7 +113,7 @@ const AdminServiceSessionsPage: FC = () => {
{/* <SessionSource deviceInfo={session.} /> */}
{typeof session.api_service?.icon_url === "string" && (
<Avatar
avatarId={session.api_service.icon_url}
avatarId={session.api_service.icon_url ?? null}
className="w-7 h-7 min-w-7"
/>
)}
@ -129,7 +129,7 @@ const AdminServiceSessionsPage: FC = () => {
<div className="flex flex-row items-center gap-2 justify-start">
{typeof session.user?.profile_picture === "string" && (
<Avatar
avatarId={session.user.profile_picture}
avatarId={session.user.profile_picture ?? null}
className="w-7 h-7 min-w-7"
/>
)}

View File

@ -127,7 +127,7 @@ const AdminUserSessionsPage: FC = () => {
<div className="flex flex-row items-center gap-2 justify-start">
{typeof session.user?.profile_picture === "string" && (
<Avatar
avatarId={session.user.profile_picture}
avatarId={session.user.profile_picture ?? null}
className="w-7 h-7 min-w-7"
/>
)}

View File

@ -64,7 +64,7 @@ const AdminViewUserPage: FC = () => {
Avatar:
</span>
<Avatar
avatarId={user.profile_picture ?? undefined}
avatarId={user.profile_picture ?? null}
className="w-16 h-16"
iconSize={28}
/>

View File

@ -94,7 +94,7 @@ const AdminUsersPage: FC = () => {
<Avatar
iconSize={21}
className="w-8 h-8"
avatarId={user.profile_picture ?? undefined}
avatarId={user.profile_picture ?? null}
/>
<p>{user.full_name}</p>
</div>

View File

@ -21,7 +21,7 @@ const VerifyReviewPage: FC = () => {
</p>
<Avatar
avatarId={profile?.profile_picture ?? undefined}
avatarId={profile?.profile_picture ?? null}
iconSize={64}
className="w-48 h-48 min-w-48 mx-auto mt-4"
/>