diff --git a/src/Components/CreateImageWizardV2/CreateImageWizard.tsx b/src/Components/CreateImageWizardV2/CreateImageWizard.tsx index ea4815fba1..ce503bbac0 100644 --- a/src/Components/CreateImageWizardV2/CreateImageWizard.tsx +++ b/src/Components/CreateImageWizardV2/CreateImageWizard.tsx @@ -10,6 +10,7 @@ import { useWizardContext, } from '@patternfly/react-core'; import { useNavigate, useSearchParams } from 'react-router-dom'; +import { useFlag } from '@unleash/proxy-client-react'; import DetailsStep from './steps/Details'; import FileSystemStep, { FileSystemContext } from './steps/FileSystem'; @@ -63,7 +64,6 @@ import { selectUseLatest, } from '../../store/wizardSlice'; import { resolveRelPath } from '../../Utilities/path'; -import useBetaFlag from '../../Utilities/useBetaFlag'; import { useGetEnvironment } from '../../Utilities/useGetEnvironment'; import { ImageBuilderHeader } from '../sharedComponents/ImageBuilderHeader'; @@ -135,7 +135,7 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => { // =========================TO REMOVE======================= - const isFirstBootEnabled = useBetaFlag('image-builder.firstboot.enabled'); + const isFirstBootEnabled = useFlag('image-builder.firstboot.enabled'); // IMPORTANT: Ensure the wizard starts with a fresh initial state useEffect(() => { dispatch(initializeWizard()); diff --git a/src/Components/CreateImageWizardV2/steps/Review/ReviewStep.tsx b/src/Components/CreateImageWizardV2/steps/Review/ReviewStep.tsx index 5f603560bd..9cebef2ca9 100644 --- a/src/Components/CreateImageWizardV2/steps/Review/ReviewStep.tsx +++ b/src/Components/CreateImageWizardV2/steps/Review/ReviewStep.tsx @@ -9,6 +9,7 @@ import { useWizardContext, } from '@patternfly/react-core'; import { ArrowRightIcon } from '@patternfly/react-icons'; +import { useFlag } from '@unleash/proxy-client-react'; import { ContentList, @@ -37,7 +38,6 @@ import { selectProfile, selectRegistrationType, } from '../../../../store/wizardSlice'; -import useBetaFlag from '../../../../Utilities/useBetaFlag'; const Review = ({ snapshottingEnabled }: { snapshottingEnabled: boolean }) => { const { goToStepById } = useWizardContext(); @@ -99,7 +99,7 @@ const Review = ({ snapshottingEnabled }: { snapshottingEnabled: boolean }) => { goToStepById(stepId); }; - const isFirstBootEnabled = useBetaFlag('image-builder.firstboot.enabled'); + const isFirstBootEnabled = useFlag('image-builder.firstboot.enabled'); return ( <> { - const getFlag = useFlag(flag); - const { isBeta } = useGetEnvironment(); - return isBeta() && getFlag; -}; - -export default useBetaFlag;