mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: project overview refactor flag (#5110)
This commit is contained in:
parent
6fab6633c9
commit
f1b8d9b8d5
@ -11,6 +11,7 @@ import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
|||||||
import { useLastViewedProject } from 'hooks/useLastViewedProject';
|
import { useLastViewedProject } from 'hooks/useLastViewedProject';
|
||||||
import { ProjectStats } from './ProjectStats/ProjectStats';
|
import { ProjectStats } from './ProjectStats/ProjectStats';
|
||||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||||
|
import { useUiFlag } from 'hooks/useUiFlag';
|
||||||
|
|
||||||
const refreshInterval = 15 * 1000;
|
const refreshInterval = 15 * 1000;
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ const ProjectOverview = () => {
|
|||||||
project;
|
project;
|
||||||
usePageTitle(`Project overview – ${projectName}`);
|
usePageTitle(`Project overview – ${projectName}`);
|
||||||
const { setLastViewed } = useLastViewedProject();
|
const { setLastViewed } = useLastViewedProject();
|
||||||
|
const featureSwitchRefactor = useUiFlag('featureSwitchRefactor');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLastViewed(projectId);
|
setLastViewed(projectId);
|
||||||
@ -62,7 +64,7 @@ const ProjectOverview = () => {
|
|||||||
<ProjectStats stats={project.stats} />
|
<ProjectStats stats={project.stats} />
|
||||||
<StyledProjectToggles>
|
<StyledProjectToggles>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={true}
|
condition={Boolean(featureSwitchRefactor)}
|
||||||
show={() => (
|
show={() => (
|
||||||
<ProjectFeatureToggles
|
<ProjectFeatureToggles
|
||||||
key={loading ? 'loading' : 'ready'}
|
key={loading ? 'loading' : 'ready'}
|
||||||
|
Loading…
Reference in New Issue
Block a user