Skip to content

Commit

Permalink
hide Sync Recommendations per comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz committed Jan 14, 2025
1 parent e1d1809 commit 7bc01ec
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions webpack/InsightsCloudSync/Components/ToolbarDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ import { useAdvisorEngineConfig } from '../../common/Hooks/ConfigHooks';
const ToolbarDropdown = ({ onRecommendationSync }) => {
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
const isLocalAdvisorEngine = useAdvisorEngineConfig();
const baseItems = [
if (!isLocalAdvisorEngine) {
return null;
}
const dropdownItems = [
<DropdownItem
key="recommendation-manual-sync"
onClick={onRecommendationSync}
>
{__('Sync recommendations')}
</DropdownItem>,
];
const cloudItems = [
<DropdownItem key="cloud-advisor-systems-link">
<a
href={redHatAdvisorSystems()}
Expand All @@ -30,9 +31,6 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
</a>
</DropdownItem>,
];
const dropdownItems = isLocalAdvisorEngine
? baseItems
: baseItems.concat(cloudItems);
return (
<Dropdown
className="title-dropdown"
Expand Down

0 comments on commit 7bc01ec

Please sign in to comment.