From 41a4551c9157257dbbf89d13b7666597efee8a61 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Tue, 14 Mar 2023 17:18:18 -0400 Subject: [PATCH] Only show tech preview banner when config.ui_next is true. Use brandName variable in tech preview banner. --- awx/ui/src/screens/Dashboard/Dashboard.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/awx/ui/src/screens/Dashboard/Dashboard.js b/awx/ui/src/screens/Dashboard/Dashboard.js index 9ec35d7ba0..716aa322f4 100644 --- a/awx/ui/src/screens/Dashboard/Dashboard.js +++ b/awx/ui/src/screens/Dashboard/Dashboard.js @@ -12,6 +12,8 @@ import { } from '@patternfly/react-core'; import { InfoCircleIcon } from '@patternfly/react-icons'; +import { useConfig } from 'contexts/Config'; +import useBrandName from 'hooks/useBrandName'; import useRequest from 'hooks/useRequest'; import { DashboardAPI } from 'api'; import ScreenHeader from 'components/ScreenHeader'; @@ -42,6 +44,8 @@ const MainPageSection = styled(PageSection)` `; function Dashboard() { + const config = useConfig(); + const brandName = useBrandName(); const [activeTabId, setActiveTabId] = useState(0); const { @@ -71,15 +75,16 @@ function Dashboard() { } return ( <> - - -

- A tech preview of the new Ansible Automation - Platform user interface can be found{' '} - here. -

-
-
+ {config?.ui_next && ( + + +

+ A tech preview of the new {brandName} user + interface can be found here. +

+
+
+ )}