V2 Wizard: Disable snapshotting in prod and stage stable

It will be better to keep the stable branches in sync as much as
possible. If snapshotting is only ready for prod-preview, we should only
expose it in stage-preview.
This commit is contained in:
lucasgarfield 2024-04-30 17:06:34 +02:00 committed by Lucas Garfield
parent 547436c177
commit f14b90cf9a

View file

@ -102,7 +102,7 @@ type CreateImageWizardProps = {
};
const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
const { isBeta, isProd } = useGetEnvironment();
const { isBeta } = useGetEnvironment();
const navigate = useNavigate();
const dispatch = useAppDispatch();
const [searchParams] = useSearchParams();
@ -113,7 +113,7 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
useListFeaturesQuery(undefined);
const snapshottingEnabled = useMemo(() => {
if (isProd() && !isBeta()) return false;
if (!isBeta()) return false;
// The below checks if other environments permit the snapshot step
return !(
!isError &&
@ -122,7 +122,7 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
data?.snapshots?.accessible === false &&
data?.snapshots?.enabled === false
);
}, [data, isSuccess, isFetching, isError, isBeta, isProd]);
}, [data, isSuccess, isFetching, isError, isBeta]);
// =========================TO REMOVE=======================