Merge pull request #825 from toeverything/bugfix/delete-member

fix: workspace owner will delete himself
This commit is contained in:
DarkSky 2023-02-06 18:06:25 +08:00 committed by GitHub
commit 22ba80c95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,6 @@ import { EnableWorkspaceButton } from '@/components/enable-workspace';
export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
const [isInviteModalShow, setIsInviteModalShow] = useState(false);
const { members, removeMember, loaded } = useMembers();
const { t } = useTranslation();
const { confirm } = useConfirm();
@ -94,6 +93,9 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
: t('Pending')}
</StyledMemberRoleContainer>
<StyledMoreVerticalButton>
{member.type === 99 ? (
<></>
) : (
<Menu
content={
<>
@ -129,6 +131,7 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
<MoreVerticalIcon />
</IconButton>
</Menu>
)}
</StyledMoreVerticalButton>
</StyledMemberListItem>
);