mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-29 19:22:38 +03:00
Merge pull request #825 from toeverything/bugfix/delete-member
fix: workspace owner will delete himself
This commit is contained in:
commit
22ba80c95d
@ -32,7 +32,6 @@ import { EnableWorkspaceButton } from '@/components/enable-workspace';
|
|||||||
export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
||||||
const [isInviteModalShow, setIsInviteModalShow] = useState(false);
|
const [isInviteModalShow, setIsInviteModalShow] = useState(false);
|
||||||
const { members, removeMember, loaded } = useMembers();
|
const { members, removeMember, loaded } = useMembers();
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { confirm } = useConfirm();
|
const { confirm } = useConfirm();
|
||||||
|
|
||||||
@ -94,6 +93,9 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
|||||||
: t('Pending')}
|
: t('Pending')}
|
||||||
</StyledMemberRoleContainer>
|
</StyledMemberRoleContainer>
|
||||||
<StyledMoreVerticalButton>
|
<StyledMoreVerticalButton>
|
||||||
|
{member.type === 99 ? (
|
||||||
|
<></>
|
||||||
|
) : (
|
||||||
<Menu
|
<Menu
|
||||||
content={
|
content={
|
||||||
<>
|
<>
|
||||||
@ -129,6 +131,7 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
|||||||
<MoreVerticalIcon />
|
<MoreVerticalIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
)}
|
||||||
</StyledMoreVerticalButton>
|
</StyledMoreVerticalButton>
|
||||||
</StyledMemberListItem>
|
</StyledMemberListItem>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user