Skip to content

Commit

Permalink
feat: add flag for last seen progress (#6703)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Mar 26, 2024
1 parent ab82543 commit 06eda20
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -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',
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 06eda20

Please sign in to comment.