diff --git a/frontend/src/component/project/Project/ProjectStatus/ProjectLifecycleSummary.tsx b/frontend/src/component/project/Project/ProjectStatus/ProjectLifecycleSummary.tsx index 5bd0c6000938..3a2b9142ac55 100644 --- a/frontend/src/component/project/Project/ProjectStatus/ProjectLifecycleSummary.tsx +++ b/frontend/src/component/project/Project/ProjectStatus/ProjectLifecycleSummary.tsx @@ -4,8 +4,7 @@ import { useProjectStatus } from 'hooks/api/getters/useProjectStatus/useProjectS import useLoading from 'hooks/useLoading'; import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; import type { FC } from 'react'; -import { Link } from 'react-router-dom'; - +import { PrettifyLargeNumber } from 'component/common/PrettifyLargeNumber/PrettifyLargeNumber'; const LifecycleBox = styled('li')(({ theme }) => ({ padding: theme.spacing(2), borderRadius: theme.shape.borderRadiusExtraLarge, @@ -31,7 +30,7 @@ const Counter = styled('span')({ justifyContent: 'space-between', }); -const BigNumber = styled('span')(({ theme }) => ({ +const BigText = styled('span')(({ theme }) => ({ fontSize: `calc(2 * ${theme.typography.body1.fontSize})`, })); @@ -48,10 +47,6 @@ const NoData = styled('span')({ fontWeight: 'normal', }); -const LinkNoUnderline = styled(Link)({ - textDecoration: 'none', -}); - const AverageDaysStat: FC<{ averageDays?: number | null }> = ({ averageDays, }) => { @@ -60,6 +55,9 @@ const AverageDaysStat: FC<{ averageDays?: number | null }> = ({ return No data; } + if (averageDays < 1) { + return 'less than a day'; + } return `${averageDays} days`; }; return ( @@ -72,6 +70,18 @@ const AverageDaysStat: FC<{ averageDays?: number | null }> = ({ ); }; +const BigNumber: FC<{ value?: number }> = ({ value }) => { + return ( + + + + ); +}; + export const ProjectLifecycleSummary = () => { const projectId = useRequiredPathParam('projectId'); const { data, loading } = useProjectStatus(projectId); @@ -85,9 +95,9 @@ export const ProjectLifecycleSummary = () => {

- - {data?.lifecycleSummary.initial.currentFlags ?? 0} - +

- - {data?.lifecycleSummary.preLive.currentFlags ?? 0} - +

- - {data?.lifecycleSummary.live.currentFlags ?? 0} - +

- - {data?.lifecycleSummary.completed.currentFlags ?? 0} - +

- - {data?.lifecycleSummary.archived.currentFlags ?? 0} - +