Skip to content

Commit 1eb042b

Browse files
eatondustin1lexun
andauthored
feat: allow self removal from account with ff on (#3555)
* feat: allow self removal from account with ff on Co-authored-by: Luke Barbuto <luke.barbuto@gmail.com> * Revert local flag listing for self removal Co-authored-by: Luke Barbuto <luke.barbuto@gmail.com>
1 parent 8fe88dd commit 1eb042b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/users/components/UserListItem.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ import {getMe} from 'src/me/selectors'
2222
// Types
2323
import {CloudUser} from 'src/types'
2424

25+
// Utils
26+
import {isFlagEnabled} from 'src/shared/utils/featureFlag'
27+
2528
interface Props {
2629
user: CloudUser
2730
}
@@ -51,6 +54,7 @@ const UserListItem: FC<Props> = ({user}) => {
5154

5255
const isCurrentUser = id === currentUserId
5356
const [revealOnHover, toggleRevealOnHover] = useState(true)
57+
const selfRemovalFromAccount = isFlagEnabled('selfRemovalFromAccount')
5458

5559
const handleShow = () => {
5660
toggleRevealOnHover(false)
@@ -89,7 +93,7 @@ const UserListItem: FC<Props> = ({user}) => {
8993
</IndexList.Cell>
9094
<IndexList.Cell className="user-list-cell-status">Active</IndexList.Cell>
9195
<IndexList.Cell revealOnHover={revealOnHover} alignment={Alignment.Right}>
92-
{!isCurrentUser && (
96+
{(!isCurrentUser || selfRemovalFromAccount) && (
9397
<ConfirmationButton
9498
icon={IconFont.Trash_New}
9599
onShow={handleShow}

0 commit comments

Comments
 (0)