diff --git a/frontend/src/components/resource-group/AddServerModal.tsx b/frontend/src/components/resource-group/AddServerModal.tsx index 92874b7..8042907 100644 --- a/frontend/src/components/resource-group/AddServerModal.tsx +++ b/frontend/src/components/resource-group/AddServerModal.tsx @@ -52,7 +52,7 @@ export const AddServerModal: React.FC = ({ { - id !== 'allow-all' && <> + !['allow-all', 'deny-all'].includes(id) && <> = ({ return !['allow-all', 'deny-all'].includes(resourceGroupDetail.id); }, [resourceGroupDetail]); - // 是否展示编辑按钮 - const showEditOptions = useMemo(() => { - if (!resourceGroupDetail) return false; - return !['deny-all'].includes(resourceGroupDetail.id); - }, [resourceGroupDetail]); - const getResourceGroup = async (groupId: string) => { const response = await fetchResourceGroupDetail(groupId); if (response) { @@ -112,7 +106,7 @@ const GroupServiceTable: React.FC = ({ {resourceGroupDetail?.name}
- {showEditOptions && currentGroupId && <> + {currentGroupId && <>