From 24ac541e58cc303d30a678e61adbc50c5bb28c7c Mon Sep 17 00:00:00 2001 From: Gitar Date: Fri, 20 Sep 2024 11:58:09 +0000 Subject: [PATCH] [Gitar] Updating TSX files --- .../src/component/project/Project/Project.tsx | 4 +-- .../Settings/EditProject/EditProject.tsx | 17 +------------ .../project/ProjectList/LegacyProjectList.tsx | 25 +++++++------------ .../project/ProjectList/ProjectList.tsx | 6 +---- 4 files changed, 12 insertions(+), 40 deletions(-) diff --git a/frontend/src/component/project/Project/Project.tsx b/frontend/src/component/project/Project/Project.tsx index e7b8084b1eb5..2db8712c5fe6 100644 --- a/frontend/src/component/project/Project/Project.tsx +++ b/frontend/src/component/project/Project/Project.tsx @@ -44,7 +44,6 @@ import { ProjectApplications } from '../ProjectApplications/ProjectApplications' import { ProjectInsights } from './ProjectInsights/ProjectInsights'; import useProjectOverview from 'hooks/api/getters/useProjectOverview/useProjectOverview'; import { ProjectArchived } from './ArchiveProject/ProjectArchived'; -import { useUiFlag } from 'hooks/useUiFlag'; const StyledBadge = styled(Badge)(({ theme }) => ({ position: 'absolute', @@ -77,7 +76,6 @@ export const Project = () => { const basePath = `/projects/${projectId}`; const projectName = project?.name || projectId; const { favorite, unfavorite } = useFavoriteProjectsApi(); - const archiveProjectsEnabled = useUiFlag('archiveProjects'); const [showDelDialog, setShowDelDialog] = useState(false); @@ -192,7 +190,7 @@ export const Project = () => { ); - if (archiveProjectsEnabled && Boolean(project.archivedAt)) { + if (project.archivedAt) { return ; } diff --git a/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/EditProject.tsx b/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/EditProject.tsx index 01a277b16db7..56d13e2b3615 100644 --- a/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/EditProject.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/Settings/EditProject/EditProject.tsx @@ -10,12 +10,10 @@ import { Alert, styled } from '@mui/material'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import { UpdateEnterpriseSettings } from './UpdateEnterpriseSettings'; import { UpdateProject } from './UpdateProject'; -import { DeleteProjectForm } from './DeleteProjectForm'; import useProjectOverview, { featuresCount, } from 'hooks/api/getters/useProjectOverview/useProjectOverview'; import { ArchiveProjectForm } from './ArchiveProjectForm'; -import { useUiFlag } from 'hooks/useUiFlag'; const StyledFormContainer = styled('div')(({ theme }) => ({ display: 'flex', @@ -28,7 +26,6 @@ const EditProject = () => { const { hasAccess } = useContext(AccessContext); const id = useRequiredPathParam('projectId'); const { project } = useProjectOverview(id); - const archiveProjectsEnabled = useUiFlag('archiveProjects'); if (!project.name) { return null; @@ -52,19 +49,7 @@ const EditProject = () => { condition={isEnterprise()} show={} /> - - } - elseShow={ - - } - /> + ); diff --git a/frontend/src/component/project/ProjectList/LegacyProjectList.tsx b/frontend/src/component/project/ProjectList/LegacyProjectList.tsx index deb87431fcbe..68f34b485769 100644 --- a/frontend/src/component/project/ProjectList/LegacyProjectList.tsx +++ b/frontend/src/component/project/ProjectList/LegacyProjectList.tsx @@ -25,7 +25,6 @@ import { useProfile } from 'hooks/api/getters/useProfile/useProfile'; import { groupProjects } from './group-projects'; import { ProjectGroup } from './ProjectGroup'; import { CreateProjectDialog } from '../Project/CreateProject/NewCreateProjectForm/CreateProjectDialog'; -import { useUiFlag } from 'hooks/useUiFlag'; const StyledApiError = styled(ApiError)(({ theme }) => ({ maxWidth: '500px', @@ -126,7 +125,6 @@ export const ProjectList = () => { const [searchValue, setSearchValue] = useState( searchParams.get('search') || '', ); - const archiveProjectsEnabled = useUiFlag('archiveProjects'); const myProjects = new Set(useProfile().profile?.projects || []); @@ -200,20 +198,15 @@ export const ProjectList = () => { } /> - - - Archived projects - - - - } - /> + <> + + Archived projects + + + diff --git a/frontend/src/component/project/ProjectList/ProjectList.tsx b/frontend/src/component/project/ProjectList/ProjectList.tsx index 4c3acbb40fb3..801f59039f03 100644 --- a/frontend/src/component/project/ProjectList/ProjectList.tsx +++ b/frontend/src/component/project/ProjectList/ProjectList.tsx @@ -36,7 +36,6 @@ const NewProjectList = () => { const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); const [state, setState] = useProjectsListState(); - const archiveProjectsEnabled = useUiFlag('archiveProjects'); const myProjects = new Set(useProfile().profile?.projects || []); @@ -78,10 +77,7 @@ const NewProjectList = () => { } /> - } - /> +