From 1fc0aca5b2e332b43ef953ccdd86e7ccd0dd4dff Mon Sep 17 00:00:00 2001 From: regexowl Date: Thu, 23 Nov 2023 16:25:50 +0100 Subject: [PATCH] Wizard: Activation key management link based on env The "Activation keys page" link on the Registration step previously led to prod from both prod and stage envs. This fixes the problem and ensures that the button in stage links to the activation key management in stage and the prod one to prod. --- .../CreateImageWizard/steps/registration.js | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/Components/CreateImageWizard/steps/registration.js b/src/Components/CreateImageWizard/steps/registration.js index bb8465f5..e4004bd6 100644 --- a/src/Components/CreateImageWizard/steps/registration.js +++ b/src/Components/CreateImageWizard/steps/registration.js @@ -15,8 +15,30 @@ import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome' import StepTemplate from './stepTemplate'; +import { useGetEnvironment } from '../../../Utilities/useGetEnvironment'; import CustomButtons from '../formComponents/CustomButtons'; +const ManageKeysButton = () => { + const { isProd } = useGetEnvironment(); + return ( + + ); +}; + const PopoverActivation = () => { const [orgId, setOrgId] = useState(null); const { auth } = useChrome(); @@ -121,17 +143,7 @@ const registrationStep = { By default, activation key is generated and preset for you. Admins can create and manage keys by visiting the  - + ), condition: {