mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
parent
a2c8e80345
commit
d089e771da
@ -1,6 +1,5 @@
|
||||
import { styled } from '@mui/material';
|
||||
import HourglassEmptyOutlinedIcon from '@mui/icons-material/HourglassEmptyOutlined';
|
||||
import PlayCircleIcon from '@mui/icons-material/PlayCircle';
|
||||
import type { IReleasePlanMilestone } from 'interfaces/releasePlans';
|
||||
import { isToday, isTomorrow, format, addMinutes } from 'date-fns';
|
||||
import { calculateMilestoneStartTime } from '../utils/calculateMilestoneStartTime.ts';
|
||||
@ -35,20 +34,11 @@ const StyledTimeContainer = styled('span')(({ theme }) => ({
|
||||
borderRadius: theme.shape.borderRadiusLarge,
|
||||
}));
|
||||
|
||||
const StyledHourglassIcon = styled(HourglassEmptyOutlinedIcon)(({ theme }) => ({
|
||||
const StyledIcon = styled(HourglassEmptyOutlinedIcon)(({ theme }) => ({
|
||||
fontSize: 18,
|
||||
color: theme.palette.primary.main,
|
||||
}));
|
||||
|
||||
const StyledPlayIcon = styled(PlayCircleIcon)(({ theme }) => ({
|
||||
fontSize: 18,
|
||||
color: theme.palette.primary.main,
|
||||
}));
|
||||
|
||||
const PrimaryText = styled('span')(({ theme }) => ({
|
||||
color: theme.palette.primary.main,
|
||||
}));
|
||||
|
||||
interface IMilestoneNextStartTimeProps {
|
||||
milestone: IReleasePlanMilestone;
|
||||
allMilestones: IReleasePlanMilestone[];
|
||||
@ -85,15 +75,13 @@ export const MilestoneNextStartTime = ({
|
||||
activeMilestoneId,
|
||||
);
|
||||
|
||||
const text = projectedStartTime ? (
|
||||
`Starting ${formatSmartDate(projectedStartTime)}`
|
||||
) : (
|
||||
<PrimaryText>Start manually</PrimaryText>
|
||||
);
|
||||
const text = projectedStartTime
|
||||
? `Starting ${formatSmartDate(projectedStartTime)}`
|
||||
: 'Waiting to start';
|
||||
|
||||
return (
|
||||
<StyledTimeContainer>
|
||||
{projectedStartTime ? <StyledHourglassIcon /> : <StyledPlayIcon />}
|
||||
<StyledIcon />
|
||||
{text}
|
||||
</StyledTimeContainer>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user