multi: on-prem can't use the unleash flag
Switch the useFlag usage to the stub function defined in the `useGetEnvironment` utility
This commit is contained in:
parent
34368c4f84
commit
aef3f4a3e4
5 changed files with 8 additions and 6 deletions
|
|
@ -12,7 +12,6 @@ import {
|
|||
Tile,
|
||||
} from '@patternfly/react-core';
|
||||
import { HelpIcon } from '@patternfly/react-icons';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
|
||||
import { useAppSelector, useAppDispatch } from '../../../../store/hooks';
|
||||
import {
|
||||
|
|
@ -31,6 +30,7 @@ import {
|
|||
selectDistribution,
|
||||
selectImageTypes,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import { useFlag } from '../../../../Utilities/useGetEnvironment';
|
||||
|
||||
const TargetEnvironment = () => {
|
||||
const arch = useAppSelector(selectArchitecture);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import {
|
|||
Title,
|
||||
} from '@patternfly/react-core';
|
||||
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
|
||||
import { Oscap, removeBetaFromRelease } from './Oscap';
|
||||
|
||||
|
|
@ -35,7 +34,10 @@ import {
|
|||
selectComplianceType,
|
||||
clearKernelAppend,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
|
||||
import {
|
||||
useFlag,
|
||||
useGetEnvironment,
|
||||
} from '../../../../Utilities/useGetEnvironment';
|
||||
|
||||
const OscapStep = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import React from 'react';
|
||||
|
||||
import { Alert, Text, Form, Title } from '@patternfly/react-core';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
|
||||
import PackageRecommendations from './PackageRecommendations';
|
||||
import Packages from './Packages';
|
||||
|
|
@ -9,6 +8,7 @@ import Packages from './Packages';
|
|||
import { RHEL_8, RHEL_9 } from '../../../../constants';
|
||||
import { useAppSelector } from '../../../../store/hooks';
|
||||
import { selectDistribution } from '../../../../store/wizardSlice';
|
||||
import { useFlag } from '../../../../Utilities/useGetEnvironment';
|
||||
|
||||
const PackagesStep = () => {
|
||||
const packageRecommendationsFlag = useFlag('image-builder.pkgrecs.enabled');
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import React from 'react';
|
|||
import AsyncComponent from '@redhat-cloud-services/frontend-components/AsyncComponent';
|
||||
import ErrorState from '@redhat-cloud-services/frontend-components/ErrorState';
|
||||
import Unavailable from '@redhat-cloud-services/frontend-components/Unavailable';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { useNavigate, useLocation, useParams } from 'react-router-dom';
|
||||
|
||||
|
|
@ -12,6 +11,7 @@ import {
|
|||
manageEdgeImagesUrlName,
|
||||
} from '../../Utilities/edge';
|
||||
import { resolveRelPath } from '../../Utilities/path';
|
||||
import { useFlag } from '../../Utilities/useGetEnvironment';
|
||||
|
||||
const ImageDetail = () => {
|
||||
const dispatch = useDispatch();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import React from 'react';
|
|||
import AsyncComponent from '@redhat-cloud-services/frontend-components/AsyncComponent';
|
||||
import ErrorState from '@redhat-cloud-services/frontend-components/ErrorState';
|
||||
import Unavailable from '@redhat-cloud-services/frontend-components/Unavailable';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { useNavigate, useLocation } from 'react-router-dom';
|
||||
|
||||
|
|
@ -13,6 +12,7 @@ import {
|
|||
manageEdgeImagesUrlName,
|
||||
} from '../../Utilities/edge';
|
||||
import { resolveRelPath } from '../../Utilities/path';
|
||||
import { useFlag } from '../../Utilities/useGetEnvironment';
|
||||
|
||||
const ImagesTable = () => {
|
||||
const dispatch = useDispatch();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue