Skip to content

Commit dd03f04

Browse files
authored
Merge pull request #2947 from headlamp-k8s/fix-details-drawer-close-in-app
frontend: Fix DetailsDrawer to not mutate url when in app mode
2 parents 08e7bd6 + 9090d23 commit dd03f04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

frontend/src/components/common/Resource/DetailsDrawer.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from 'react';
33
import { useTranslation } from 'react-i18next';
44
import { useDispatch } from 'react-redux';
55
import { useLocation } from 'react-router';
6+
import helpers from '../../../helpers';
67
import { setSelectedResource } from '../../../redux/drawerModeSlice';
78
import { useTypedSelector } from '../../../redux/reducers/reducers';
89
import { KubeObjectDetails } from '../../resourceMap/details/KubeNodeDetails';
@@ -18,6 +19,8 @@ export default function DetailsDrawer() {
1819
const isDetailDrawerEnabled = useTypedSelector(state => state.drawerMode.isDetailDrawerEnabled);
1920

2021
function handleCloseDrawerReset() {
22+
if (helpers.isElectron()) return;
23+
2124
const currentPlacement = location.pathname;
2225
const pathname = currentPlacement;
2326

0 commit comments

Comments
 (0)