Skip to content

Commit

Permalink
fix landing page and ImageBuilderHeader to support cockpit
Browse files Browse the repository at this point in the history
  • Loading branch information
mgold1234 committed Sep 17, 2024
1 parent 024d940 commit df91224
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Components/LandingPage/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { NewAlert } from './NewAlert';
import { MANAGING_WITH_DNF_URL, OSTREE_URL } from '../../constants';
import { manageEdgeImagesUrlName } from '../../Utilities/edge';
import { resolveRelPath } from '../../Utilities/path';
import { getFeatureFlag } from '../../Utilities/useGetEnvironment';
import BlueprintsSidebar from '../Blueprints/BlueprintsSideBar';
import EdgeImagesTable from '../edge/ImagesTable';
import ImagesTable from '../ImagesTable/ImagesTable';
Expand All @@ -54,8 +55,7 @@ export const LandingPage = () => {
}
setActiveTabKey(tabIndex);
};

const edgeParityFlag = useFlag('edgeParity.image-list');
const edgeParityFlag = getFeatureFlag('edgeParity.image-list', useFlag);

const imageList = (
<>
Expand Down
10 changes: 7 additions & 3 deletions src/Components/sharedComponents/ImageBuilderHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import {
} from '../../constants';
import { resolveRelPath } from '../../Utilities/path';
import './ImageBuilderHeader.scss';
import { useFlagWithEphemDefault } from '../../Utilities/useGetEnvironment';
import {
getFeatureFlag,
useFlagWithEphemDefault,
} from '../../Utilities/useGetEnvironment';
import { ImportBlueprintModal } from '../Blueprints/ImportBlueprintModal';

type ImageBuilderHeaderPropTypes = {
Expand Down Expand Up @@ -94,8 +97,9 @@ export const ImageBuilderHeader = ({
inWizard,
}: ImageBuilderHeaderPropTypes) => {
const navigate = useNavigate();
const importExportFlag = useFlagWithEphemDefault(
'image-builder.import.enabled'
const importExportFlag = getFeatureFlag(
'image-builder.import.enabled',
useFlagWithEphemDefault
);
const [showImportModal, setShowImportModal] = useState(false);
const isOnBlueprintsTab = activeTab === 0;
Expand Down

0 comments on commit df91224

Please sign in to comment.