+
+ {u.name || '—'}
+
+
{u.email}
+
+
+ {u.role || 'user'}
+
+
+
+ {u.banned ? (
+ Banned
+ ) : (
+ Active
+ )}
+
+
+ {u.id !== session?.user?.id && (
+ <>
+
- ) : banUserId === u.id ? (
-
- setBanReason(e.target.value)}
- placeholder='Reason (optional)'
- className='h-[28px] w-[120px] text-caption'
- />
-
+ {u.banned ? (
+ ) : (
+
+ )}
+ >
+ )}
+
+
+ {banUserId === u.id && !u.banned && (
+
+ setBanReason(e.target.value)}
+ placeholder='Reason (optional)'
+ className='h-[28px] flex-1 text-caption'
+ />
+
-
- ) : (
-
- )}
- >
- )}
-
+ },
+ }
+ )
+ }}
+ disabled={pendingUserIds.has(u.id)}
+ >
+ Confirm Ban
+
+
+ )}