Skip to content

Commit 8590a58

Browse files
committed
Refactor ProxyMenu component to simplify conditional rendering of proxy start and stop options
1 parent 2587db4 commit 8590a58

File tree

1 file changed

+2
-4
lines changed
  • share/dashboard_react/src/Pages/Dashboard/components/Proxies

1 file changed

+2
-4
lines changed

share/dashboard_react/src/Pages/Dashboard/components/Proxies/ProxyMenu.jsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ function ProxyMenu({ clusterName, row, isDesktop, colorScheme, from = 'tableView
7878
}
7979
]
8080
: []),
81-
...(user?.grants['proxy-start'] && isMenuOptionsVisible
82-
? [
81+
...(user?.grants['proxy-start'] ? [
8382
{
8483
name: 'Start Proxy',
8584
onClick: () => {
@@ -90,8 +89,7 @@ function ProxyMenu({ clusterName, row, isDesktop, colorScheme, from = 'tableView
9089
}
9190
]
9291
: []),
93-
...(user?.grants['proxy-stop'] && isMenuOptionsVisible
94-
? [
92+
...(user?.grants['proxy-stop'] ? [
9593
{
9694
name: 'Stop Proxy',
9795
onClick: () => {

0 commit comments

Comments
 (0)