From 52cbca87e04030620f9a98e18f31f30d3cb63eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Maro=C5=A1i?= Date: Mon, 14 Aug 2023 16:09:14 +0200 Subject: [PATCH 1/3] Add dynamic partner title to product selection screen. --- .../Stratosphere/ProductSelection.tsx | 134 +++++++++--------- .../Stratosphere/RedirectBanner.test.tsx | 3 +- .../Stratosphere/RedirectBanner.tsx | 29 +--- src/hooks/useMarketplacePartner.ts | 37 +++++ 4 files changed, 114 insertions(+), 89 deletions(-) create mode 100644 src/hooks/useMarketplacePartner.ts diff --git a/src/components/Stratosphere/ProductSelection.tsx b/src/components/Stratosphere/ProductSelection.tsx index d042bc7b3..68495d9ef 100644 --- a/src/components/Stratosphere/ProductSelection.tsx +++ b/src/components/Stratosphere/ProductSelection.tsx @@ -7,74 +7,78 @@ import ProductCard from './ProductCard'; import { Header } from '../Header/Header'; import ChromeLink from '../ChromeLink/ChromeLink'; import Footer from './Footer'; +import useMarketplacePartner from '../../hooks/useMarketplacePartner'; import './product-selection.scss'; -const ProductSelection = () => ( -
- -
- - } - > -
- - - - - - - - - - - - Congratulations, +const ProductSelection = () => { + const { partner } = useMarketplacePartner(); + return ( + <div id="chrome-app-render-root"> + <Page + header={ + <Masthead className="chr-c-masthead"> + <Header /> + </Masthead> + } + > + <div className="chr-c-product-selection pf-u-pt-lg pf-u-pb-lg"> + <Stack hasGutter> + <StackItem> + <Bullseye> + <CheckCircleIcon size="xl" color="var(--pf-global--success-color--100)" /> + </Bullseye> + </StackItem> + <StackItem> + <Stack> + <StackItem> + <Bullseye> + <Title size="3xl" headingLevel="h1"> + Congratulations, + + + + + + your Red Hat and {partner} accounts are connected and you can now access Red Hat support resources - - - - - your Red Hat and AWS accounts are connected and you can now access Red Hat support resources - - - - - - - - To get started using your Red Hat products, follow the links below - - - - - -
- {productsList.map((item, i) => ( - - ))} -
-
-
- - - - - To manage or learn more about your Red Hat subscriptions, visit{' '} - - subscriptions. - - - - - -
-
-
- -
-); + + + + + + + To get started using your Red Hat products, follow the links below + + + + + +
+ {productsList.map((item, i) => ( + + ))} +
+
+
+ + + + + To manage or learn more about your Red Hat subscriptions, visit{' '} + + subscriptions. + + + + + + + +