Wizard: Add isHidden to snapshotting step

Replace conditional rendering with `isHidden` for snapshotting step.
This commit is contained in:
regexowl 2024-08-01 17:44:29 +02:00 committed by Klara Simickova
parent e891b0dc04
commit d88cd216a5

View file

@ -365,22 +365,19 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
name="Content"
id="step-content"
steps={[
...(snapshottingEnabled
? [
<WizardStep
name="Repository snapshot"
id="wizard-repository-snapshot"
key="wizard-repository-snapshot"
footer={
<CustomWizardFooter
disableNext={snapshotStepRequiresChoice}
/>
}
>
<SnapshotStep />
</WizardStep>,
]
: []),
<WizardStep
name="Repository snapshot"
id="wizard-repository-snapshot"
key="wizard-repository-snapshot"
isHidden={!snapshottingEnabled}
footer={
<CustomWizardFooter
disableNext={snapshotStepRequiresChoice}
/>
}
>
<SnapshotStep />
</WizardStep>,
<WizardStep
name="Custom repositories"
id="wizard-custom-repositories"