1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

feat: add flag for last seen progress (#6703)

This commit is contained in:
Jaanus Sellin 2024-03-26 16:31:58 +02:00 committed by GitHub
parent ab82543f54
commit 06eda20344
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ import type { ILastSeenEnvironments } from 'interfaces/featureToggle';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { useLastSeenColors } from 'component/feature/FeatureView/FeatureEnvironmentSeen/useLastSeenColors';
import { LastSeenProgress } from './LastSeenProgress/LastSeenProgress';
import { useUiFlag } from 'hooks/useUiFlag';
const StyledDescription = styled(
'div',
@ -73,6 +74,7 @@ export const LastSeenTooltip = ({
...rest
}: ILastSeenTooltipProps) => {
const getColor = useLastSeenColors();
const projectOverviewRefactor = useUiFlag('projectOverviewRefactor');
const [, defaultTextColor] = getColor();
const environmentsHaveLastSeen = environments?.some((environment) =>
Boolean(environment.lastSeenAt),
@ -131,7 +133,12 @@ export const LastSeenTooltip = ({
}
/>
</StyledValueContainer>
<LastSeenProgress yes={yes} no={no} />
<ConditionallyRender
condition={Boolean(projectOverviewRefactor)}
show={
<LastSeenProgress yes={yes} no={no} />
}
/>
</StyledDescriptionBlock>
))}
</StyledListContainer>