We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eaac8b commit 1a22466Copy full SHA for 1a22466
src/components/ui/members/member-card.tsx
@@ -61,9 +61,9 @@ export function MemberCard({
61
62
// Check if current user is a coach in any of this user's relationships
63
// and make sure we can't delete ourselves. Admins can delete any user.
64
- const canDeleteUser = userRelationships?.some(
+ const canDeleteUser = (userRelationships?.some(
65
(rel) => rel.coach_id === userSession.id && userId !== userSession.id
66
- ) || (userSession.role === Role.Admin && userSession.id !== userId);
+ ) || (userSession.role === Role.Admin)) && userSession.id !== userId;
67
68
const handleDelete = async () => {
69
if (!confirm("Are you sure you want to delete this member?")) {
0 commit comments