1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-18 01:18:23 +02: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 { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { useLastSeenColors } from 'component/feature/FeatureView/FeatureEnvironmentSeen/useLastSeenColors'; import { useLastSeenColors } from 'component/feature/FeatureView/FeatureEnvironmentSeen/useLastSeenColors';
import { LastSeenProgress } from './LastSeenProgress/LastSeenProgress'; import { LastSeenProgress } from './LastSeenProgress/LastSeenProgress';
import { useUiFlag } from 'hooks/useUiFlag';
const StyledDescription = styled( const StyledDescription = styled(
'div', 'div',
@ -73,6 +74,7 @@ export const LastSeenTooltip = ({
...rest ...rest
}: ILastSeenTooltipProps) => { }: ILastSeenTooltipProps) => {
const getColor = useLastSeenColors(); const getColor = useLastSeenColors();
const projectOverviewRefactor = useUiFlag('projectOverviewRefactor');
const [, defaultTextColor] = getColor(); const [, defaultTextColor] = getColor();
const environmentsHaveLastSeen = environments?.some((environment) => const environmentsHaveLastSeen = environments?.some((environment) =>
Boolean(environment.lastSeenAt), Boolean(environment.lastSeenAt),
@ -131,7 +133,12 @@ export const LastSeenTooltip = ({
} }
/> />
</StyledValueContainer> </StyledValueContainer>
<ConditionallyRender
condition={Boolean(projectOverviewRefactor)}
show={
<LastSeenProgress yes={yes} no={no} /> <LastSeenProgress yes={yes} no={no} />
}
/>
</StyledDescriptionBlock> </StyledDescriptionBlock>
))} ))}
</StyledListContainer> </StyledListContainer>