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:
parent
ab82543f54
commit
06eda20344
@ -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>
|
||||||
<LastSeenProgress yes={yes} no={no} />
|
<ConditionallyRender
|
||||||
|
condition={Boolean(projectOverviewRefactor)}
|
||||||
|
show={
|
||||||
|
<LastSeenProgress yes={yes} no={no} />
|
||||||
|
}
|
||||||
|
/>
|
||||||
</StyledDescriptionBlock>
|
</StyledDescriptionBlock>
|
||||||
))}
|
))}
|
||||||
</StyledListContainer>
|
</StyledListContainer>
|
||||||
|
Loading…
Reference in New Issue
Block a user