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 { export interface AvatarProps {
iconSize?: number; iconSize?: number;
className?: string; className?: string;
avatarId?: string; avatarId?: string | null;
} }
const Avatar: FC<AvatarProps> = ({ iconSize = 32, className, avatarId }) => { const Avatar: FC<AvatarProps> = ({ iconSize = 32, className, avatarId }) => {

View File

@ -45,7 +45,7 @@ const RolesGroup: FC<IPermissionGroupProps> = ({ scope, roles }) => {
</ol> </ol>
{index + 1 < roles.length && ( {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> </div>
))} ))}

View File

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

View File

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

View File

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

View File

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