Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions src/components/settings/forms/JoinedClubs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,29 @@ function ClubListItem({ joinedClub, onLeave }: ClubListItemProps) {
}
/>
)}
<Tooltip title="Unfollow club">
<IconButton aria-label="unfollow" onClick={onLeave}>
<DeleteIcon />
</IconButton>
<Tooltip
title={
canManage ? (
<div className="text-center">
You cannot Unfollow this club
<br />
Another admin must remove you
</div>
) : (
'Unfollow club'
)
}
>
{/* This span is required to ensure the locked tooltip shows when the IconButton is disabled */}
<span>
<IconButton
aria-label="unfollow"
onClick={onLeave}
disabled={canManage}
>
<DeleteIcon />
</IconButton>
</span>
</Tooltip>
</div>
</div>
Expand Down
Loading