From 4189e9f31d55667abbb8dee36e7b524079fc554a Mon Sep 17 00:00:00 2001 From: regexowl Date: Tue, 23 Apr 2024 11:50:02 +0200 Subject: [PATCH] V2Wizard: Remove "Recreate" option for expired images This replaces the "Recreate" option for expired imaged with a disabled download link. The change is gated behind experimental mode so V1 imagesTable composes are not affected. --- src/Components/ImagesTable/Instance.tsx | 31 ++++++++++++++----------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/Components/ImagesTable/Instance.tsx b/src/Components/ImagesTable/Instance.tsx index 181f2ea8..b756b5b0 100644 --- a/src/Components/ImagesTable/Instance.tsx +++ b/src/Components/ImagesTable/Instance.tsx @@ -40,6 +40,7 @@ import { isOciUploadStatus, } from '../../store/typeGuards'; import { resolveRelPath } from '../../Utilities/path'; +import { useExperimentalFlag } from '../../Utilities/useExperimentalFlag'; import useProvisioningPermissions from '../../Utilities/useProvisioningPermissions'; type CloudInstancePropTypes = { @@ -347,6 +348,7 @@ export const AwsS3Instance = ({ }); const navigate = useNavigate(); + const experimentalFlag = useExperimentalFlag(); if (!isSuccess) { return ; @@ -386,20 +388,7 @@ export const AwsS3Instance = ({ ) ); - } else if (!isExpired) { - return ( - - ); - } else if (isExpired) { + } else if (isExpired && !experimentalFlag) { return ( + ); } };