From 0c139c98e7489094fbcf0862902a2f4dfc8f4d7a Mon Sep 17 00:00:00 2001 From: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:55:36 -0700 Subject: [PATCH] UI: Hide teams dropdown on software details pages in Primo mode (#30218) ## #30200 ![ezgif-73f99c5eaa3368](https://github.com/user-attachments/assets/77e10692-04c8-4021-b9dc-8bd4fcd90726) - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling --- changes/30200-hide-sw-details-teams-dropdowns | 1 + .../SoftwareOSDetailsPage/SoftwareOSDetailsPage.tsx | 4 ++-- .../SoftwareTitleDetailsPage/SoftwareTitleDetailsPage.tsx | 2 +- .../SoftwareVersionDetailsPage/SoftwareVersionDetailsPage.tsx | 4 ++-- .../SoftwareVulnerabilityDetailsPage.tsx | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 changes/30200-hide-sw-details-teams-dropdowns diff --git a/changes/30200-hide-sw-details-teams-dropdowns b/changes/30200-hide-sw-details-teams-dropdowns new file mode 100644 index 0000000000..7f7127a923 --- /dev/null +++ b/changes/30200-hide-sw-details-teams-dropdowns @@ -0,0 +1 @@ +* Hide the teams dropdown from the 4 software details pages in Primo mode diff --git a/frontend/pages/SoftwarePage/SoftwareOSDetailsPage/SoftwareOSDetailsPage.tsx b/frontend/pages/SoftwarePage/SoftwareOSDetailsPage/SoftwareOSDetailsPage.tsx index 7090564f5c..0664fff6e7 100644 --- a/frontend/pages/SoftwarePage/SoftwareOSDetailsPage/SoftwareOSDetailsPage.tsx +++ b/frontend/pages/SoftwarePage/SoftwareOSDetailsPage/SoftwareOSDetailsPage.tsx @@ -54,7 +54,7 @@ const SoftwareOSDetailsPage = ({ router, location, }: ISoftwareOSDetailsPageProps) => { - const { isPremiumTier, isOnGlobalTeam } = useContext(AppContext); + const { isPremiumTier, isOnGlobalTeam, config } = useContext(AppContext); const handlePageError = useErrorHandler(); const osVersionIdFromURL = parseInt(routeParams.id, 10); @@ -149,7 +149,7 @@ const SoftwareOSDetailsPage = ({ return ( <> - {isPremiumTier && ( + {isPremiumTier && !config?.partnerships?.enable_primo && ( - {isPremiumTier && ( + {isPremiumTier && !config?.partnerships?.enable_primo && ( { - const { isPremiumTier, isOnGlobalTeam } = useContext(AppContext); + const { isPremiumTier, isOnGlobalTeam, config } = useContext(AppContext); const handlePageError = useErrorHandler(); const versionId = parseInt(routeParams.id, 10); @@ -144,7 +144,7 @@ const SoftwareVersionDetailsPage = ({ return ( <> - {isPremiumTier && ( + {isPremiumTier && !config?.partnerships?.enable_primo && ( { - const { isPremiumTier, isOnGlobalTeam } = useContext(AppContext); + const { isPremiumTier, isOnGlobalTeam, config } = useContext(AppContext); const handlePageError = useErrorHandler(); const { @@ -130,7 +130,7 @@ const SoftwareVulnerabilityDetailsPage = ({ } return ( <> - {isPremiumTier && ( + {isPremiumTier && !config?.partnerships?.enable_primo && (