From 0dcc62a1ca023408205b337d781090e08a76ebb2 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 28 May 2024 18:03:11 -0400 Subject: [PATCH] only show help center toggle on settings if not locked but always display on admin page --- inc/Data.php | 2 -- src/app/pages/admin/index.js | 2 +- src/app/pages/settings/helpCenterSettings.js | 26 +++++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/inc/Data.php b/inc/Data.php index 8bc23b44a..4f04c9113 100644 --- a/inc/Data.php +++ b/inc/Data.php @@ -7,8 +7,6 @@ namespace Bluehost; -use function NewfoldLabs\WP\Module\Features\getFeatures; - /** * \Bluehost\Data * This class does not have a constructor to get instantiated, just static methods. diff --git a/src/app/pages/admin/index.js b/src/app/pages/admin/index.js index cccebc8fe..4f0e2dcd2 100644 --- a/src/app/pages/admin/index.js +++ b/src/app/pages/admin/index.js @@ -29,7 +29,7 @@ const Admin = () => { >
- +

diff --git a/src/app/pages/settings/helpCenterSettings.js b/src/app/pages/settings/helpCenterSettings.js index 75ed9d4c1..56fa6a6ae 100644 --- a/src/app/pages/settings/helpCenterSettings.js +++ b/src/app/pages/settings/helpCenterSettings.js @@ -5,7 +5,7 @@ import AppStore from '../../data/store'; import { featureToggle, updateUI } from '../../util/helpers'; import { useNotification } from 'App/components/notifications'; -const HelpCenterSettings = () => { +const HelpCenterSettings = ( { forceShow = false } ) => { const { store, setStore } = useContext( AppStore ); const [ helpCenter, setHelpCenter ] = useState( store.features.helpCenter ); const [ helpCenterLocked, setHelpCenterLocked ] = useState( @@ -75,17 +75,19 @@ const HelpCenterSettings = () => { return (
- + { ( ! helpCenterLocked || forceShow ) && ( + + ) } { isError && (