Hide Leave team button if last member

Previously clicking button shows an error toast which is not the best UX
This commit is contained in:
Kalle 2026-05-27 17:47:39 +03:00
parent cc4219de35
commit 80a4cf5ca3

View File

@ -73,7 +73,7 @@ function ActionButtons() {
{isTeamMember({ user, team }) && !isMainTeam ? (
<ChangeMainTeamButton />
) : null}
{isTeamMember({ user, team }) ? (
{isTeamMember({ user, team }) && team.members.length > 1 ? (
<FormWithConfirm
dialogHeading={`${t(
isTeamOwner({ user, team })