Wizard: Conditionally hide package recommendations
This shows package recommendations only when RHEL 8 or RHEL 9 are selected as a distribution.
This commit is contained in:
parent
c0801cd73d
commit
b16243f68a
1 changed files with 5 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ import { useFlag } from '@unleash/proxy-client-react';
|
|||
import PackageRecommendations from './PackageRecommendations';
|
||||
import Packages from './Packages';
|
||||
|
||||
import { CENTOS_9 } from '../../../../constants';
|
||||
import { RHEL_8, RHEL_9 } from '../../../../constants';
|
||||
import { useAppSelector } from '../../../../store/hooks';
|
||||
import { selectDistribution } from '../../../../store/wizardSlice';
|
||||
|
||||
|
|
@ -25,9 +25,10 @@ const PackagesStep = () => {
|
|||
package groups.
|
||||
</Alert>
|
||||
<Packages />
|
||||
{packageRecommendationsFlag && distribution !== CENTOS_9 && (
|
||||
<PackageRecommendations />
|
||||
)}
|
||||
{packageRecommendationsFlag &&
|
||||
(distribution === RHEL_8 || distribution === RHEL_9) && (
|
||||
<PackageRecommendations />
|
||||
)}
|
||||
</Form>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue