Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wizard: feature flag to decide environments to be enabled in #2223

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Components/CreateImageWizardV2/CreateImageWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
WizardStepType,
useWizardContext,
} from '@patternfly/react-core';
import { useFlag } from '@unleash/proxy-client-react';
import { useNavigate, useSearchParams } from 'react-router-dom';

import DetailsStep from './steps/Details';
Expand Down Expand Up @@ -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';

Expand Down Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -37,7 +38,6 @@ import {
selectProfile,
selectRegistrationType,
} from '../../../../store/wizardSlice';
import useBetaFlag from '../../../../Utilities/useBetaFlag';

const Review = ({ snapshottingEnabled }: { snapshottingEnabled: boolean }) => {
const { goToStepById } = useWizardContext();
Expand Down Expand Up @@ -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 (
<>
<ExpandableSection
Expand Down
11 changes: 0 additions & 11 deletions src/Utilities/useBetaFlag.ts

This file was deleted.

Loading