[WEB-5125] fix: suspended user view #7964

This commit is contained in:
Vamsi Krishna 2025-10-14 17:35:39 +05:30 committed by GitHub
parent 606e34ec81
commit 97e662215a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,33 +49,24 @@ export const NameColumn: React.FC<NameProps> = (props) => {
<div className="relative group">
<div className="flex items-center gap-x-4 gap-y-2 w-72 justify-between">
<div className="flex items-center gap-x-2 gap-y-2 flex-1">
{avatar_url && avatar_url.trim() !== "" ? (
{isSuspended ? (
<div className="bg-custom-background-80 rounded-full p-0.5">
<SuspendedUserIcon className="h-4 w-4 text-custom-text-400" />
</div>
) : avatar_url && avatar_url.trim() !== "" ? (
<Link href={`/${workspaceSlug}/profile/${id}`}>
<span className="relative flex h-6 w-6 items-center justify-center rounded-full capitalize text-white">
{isSuspended ? (
<SuspendedUserIcon className="h-4 w-4 text-custom-text-400" />
) : (
<img
src={getFileURL(avatar_url)}
className="absolute left-0 top-0 h-full w-full rounded-full object-cover"
alt={display_name || email}
/>
)}
<img
src={getFileURL(avatar_url)}
className="absolute left-0 top-0 h-full w-full rounded-full object-cover"
alt={display_name || email}
/>
</span>
</Link>
) : (
<Link href={`/${workspaceSlug}/profile/${id}`}>
<span
className={cn(
"relative flex h-4 w-4 text-xs items-center justify-center rounded-full capitalize text-white",
isSuspended ? "bg-custom-background-80" : "bg-gray-700"
)}
>
{isSuspended ? (
<SuspendedUserIcon className="h-4 w-4 text-custom-text-400" />
) : (
(email ?? display_name ?? "?")[0]
)}
<span className="relative flex h-4 w-4 text-xs items-center justify-center rounded-full capitalize text-white bg-gray-700">
{(email ?? display_name ?? "?")[0]}
</span>
</Link>
)}