Wizard: Replace isBeta() with conditional flag

This replaces `isBeta()` with a constraint added to the 'image-builder.pkgrecs.enabled' unleash flag.
This commit is contained in:
regexowl 2024-08-01 12:11:59 +02:00 committed by Klara Simickova
parent 98a179b1cc
commit b0725c054e

View file

@ -9,10 +9,8 @@ import Packages from './Packages';
import { CENTOS_9 } from '../../../../constants';
import { useAppSelector } from '../../../../store/hooks';
import { selectDistribution } from '../../../../store/wizardSlice';
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
const PackagesStep = () => {
const { isBeta } = useGetEnvironment();
const packageRecommendationsFlag = useFlag('image-builder.pkgrecs.enabled');
const distribution = useAppSelector(selectDistribution);
return (
@ -27,7 +25,7 @@ const PackagesStep = () => {
package groups.
</Alert>
<Packages />
{isBeta() && packageRecommendationsFlag && distribution !== CENTOS_9 && (
{packageRecommendationsFlag && distribution !== CENTOS_9 && (
<PackageRecommendations />
)}
</Form>