From 26d7065dc34039c131692ea19d5ae46cc3d19d7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nuno=20G=C3=B3is?=
Before you can delete a project, you must first archive all the
feature toggles associated with it. Keep in mind that deleting a
project will permanently remove all the archived feature
toggles, and they cannot be recovered once deleted.
-
---
.../Settings/DeleteProject.tsx | 49 ++++++++++++++-----
1 file changed, 36 insertions(+), 13 deletions(-)
diff --git a/frontend/src/component/project/Project/ProjectSettings/Settings/DeleteProject.tsx b/frontend/src/component/project/Project/ProjectSettings/Settings/DeleteProject.tsx
index 6fa9aebc9f..6577636de9 100644
--- a/frontend/src/component/project/Project/ProjectSettings/Settings/DeleteProject.tsx
+++ b/frontend/src/component/project/Project/ProjectSettings/Settings/DeleteProject.tsx
@@ -4,18 +4,17 @@ import PermissionButton from 'component/common/PermissionButton/PermissionButton
import { DeleteProjectDialogue } from '../../DeleteProject/DeleteProjectDialogue';
import { useState } from 'react';
import { useNavigate } from 'react-router';
+import { useUiFlag } from 'hooks/useUiFlag';
+import { useActions } from 'hooks/api/getters/useActions/useActions';
+import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
+import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
const StyledContainer = styled('div')(({ theme }) => ({
+ display: 'flex',
+ flexDirection: 'column',
borderTop: `1px solid ${theme.palette.divider}`,
-}));
-
-const StyledTitle = styled('div')(({ theme }) => ({
paddingTop: theme.spacing(4),
- lineHeight: 2,
-}));
-
-const StyledCounter = styled('div')(({ theme }) => ({
- paddingTop: theme.spacing(3),
+ gap: theme.spacing(2),
}));
const StyledButtonContainer = styled('div')(({ theme }) => ({
@@ -33,21 +32,45 @@ export const DeleteProject = ({
projectId,
featureCount,
}: IDeleteProjectProps) => {
+ const { isEnterprise } = useUiConfig();
+ const automatedActionsEnabled = useUiFlag('automatedActions');
+ const { actions } = useActions(projectId);
const [showDelDialog, setShowDelDialog] = useState(false);
const navigate = useNavigate();
return (
Currently there are{' '} {featureCount} feature toggles active - +
+