diff --git a/ui/AdminsPage.tsx b/ui/AdminsPage.tsx index aa98707..37fcf23 100644 --- a/ui/AdminsPage.tsx +++ b/ui/AdminsPage.tsx @@ -160,42 +160,72 @@ function AdminListItem(props: { admin: AdminData; sessionId: string | null }) { : null, (args) => fetchApi(...args).then(handleResponse), ); + const getAdminPhoto = useSWR( + ["users/{userId}/photo", "GET", { params: { userId: String(admin.tgUserId) } }] as const, + (args) => fetchApi(...args).then(handleResponse).then((blob) => URL.createObjectURL(blob)), + ); return ( -
- {getAdminUser.data?.first_name ?? admin.id} {getAdminUser.data?.last_name}{" "} - {getAdminUser.data?.username +
- {getAdminUser.data?.bio} -
- ) - : null} - {getUser.data?.admin && ( -- +
+ {getAdminUser.data?.username + ? ( + + @{getAdminUser.data.username} + + ) + : null}
- )} + + {getAdminUser.data?.bio + ? ( ++ {getAdminUser.data?.bio} +
+ ) + : null} + + {getUser.data?.admin && ( ++ +
+ )} +