App: experimental features in beta only

When the unleash switch `image-builder.new-wizard.enabled` will get
activated on stage the blueprint and new wizard will be visible on the
platform.
To make them only visible in preview we need to change the condition to
check if Beta is selected by the user.
This commit is contained in:
Thomas Lavocat 2024-03-05 11:19:44 +01:00 committed by Lucas Garfield
parent 6b79d5b1a8
commit c81ac76ea8
2 changed files with 8 additions and 2 deletions

View file

@ -58,6 +58,7 @@ import {
computeHoursToExpiration,
timestampToDisplayString,
} from '../../Utilities/time';
import { useGetEnvironment } from '../../Utilities/useGetEnvironment';
import { BlueprintActionsMenu } from '../Blueprints/BlueprintActionsMenu';
import { BuildImagesButton } from '../Blueprints/BuildImagesButton';
import { DeleteBlueprintModal } from '../Blueprints/DeleteBlueprintModal';
@ -497,8 +498,10 @@ const Row = ({
}: RowPropTypes) => {
const [isExpanded, setIsExpanded] = useState(false);
const handleToggle = () => setIsExpanded(!isExpanded);
const { isBeta } = useGetEnvironment();
const experimentalFlag =
useFlag('image-builder.new-wizard.enabled') || process.env.EXPERIMENTAL;
(useFlag('image-builder.new-wizard.enabled') || process.env.EXPERIMENTAL) &&
isBeta();
const navigate = useNavigate();
return (