Skip to content

Commit 1ea7298

Browse files
committed
fix: admin terminal isAdminTerminalVisible check
1 parent a02b1b5 commit 1ea7298

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/ClusterNodes/ClusterTerminal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ const ClusterTerminal = ({
8888
}: ClusterTerminalType) => {
8989
const { replace } = useHistory()
9090
const location = useLocation()
91-
const isAdminTerminalVisible = location.pathname.includes('terminal')
91+
const isAdminTerminalVisible =
92+
location.pathname ===
93+
generatePath(RESOURCE_BROWSER_ROUTES.TERMINAL, {
94+
clusterId,
95+
})
9296
const queryParams = new URLSearchParams(location.search)
9397
const terminalAccessIdRef = useRef()
9498
const clusterShellTypes = shellTypes.filter((types) => types.label === 'sh' || types.label === 'bash')

0 commit comments

Comments
 (0)