diff --git a/frontend/src/component/project/NewProjectCard/ProjectArchiveCard.tsx b/frontend/src/component/project/NewProjectCard/ProjectArchiveCard.tsx index 591e09909813..8dd8c879b12a 100644 --- a/frontend/src/component/project/NewProjectCard/ProjectArchiveCard.tsx +++ b/frontend/src/component/project/NewProjectCard/ProjectArchiveCard.tsx @@ -85,6 +85,7 @@ export const ProjectArchiveCard: FC = ({

= ({ name }) => { + return ( +

+ The project {name} has been archived. You can find + it on the{' '} + projects archive page. +

+ ); +}; diff --git a/frontend/src/component/project/Project/Project.tsx b/frontend/src/component/project/Project/Project.tsx index b4daa05083c2..bfaf798cbe8a 100644 --- a/frontend/src/component/project/Project/Project.tsx +++ b/frontend/src/component/project/Project/Project.tsx @@ -43,6 +43,8 @@ import { ChangeRequestPlausibleProvider } from 'component/changeRequest/ChangeRe 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', @@ -75,6 +77,7 @@ 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); @@ -189,6 +192,10 @@ export const Project = () => { ); + if (archiveProjectsEnabled && Boolean(project.archivedAt)) { + return ; + } + return (
diff --git a/frontend/src/interfaces/project.ts b/frontend/src/interfaces/project.ts index 4f55839d70ec..d2b0e69faa21 100644 --- a/frontend/src/interfaces/project.ts +++ b/frontend/src/interfaces/project.ts @@ -59,6 +59,7 @@ export interface IProjectOverview { defaultStickiness: string; featureLimit?: number; featureNaming?: FeatureNamingType; + archivedAt?: Date; } export interface IProjectHealthReport extends IProject {