mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-17 23:47:12 +00:00
fix: fix the trace explorer back navigation issue (#8760)
This commit is contained in:
parent
17533b2f1c
commit
88312e971d
@ -10,7 +10,6 @@ import { QuickFiltersSource, SignalType } from 'components/QuickFilters/types';
|
||||
import WarningPopover from 'components/WarningPopover/WarningPopover';
|
||||
import { LOCALSTORAGE } from 'constants/localStorage';
|
||||
import { AVAILABLE_EXPORT_PANEL_TYPES } from 'constants/panelTypes';
|
||||
import { QueryParams } from 'constants/query';
|
||||
import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';
|
||||
import ExplorerOptionWrapper from 'container/ExplorerOptions/ExplorerOptionWrapper';
|
||||
import ExportPanel from 'container/ExportPanel';
|
||||
@ -65,7 +64,7 @@ function TracesExplorer(): JSX.Element {
|
||||
},
|
||||
});
|
||||
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
// Get panel type from URL
|
||||
const panelTypesFromUrl = useGetPanelTypesQueryParam(PANEL_TYPES.LIST);
|
||||
@ -88,14 +87,6 @@ function TracesExplorer(): JSX.Element {
|
||||
}
|
||||
}, [panelTypesFromUrl, selectedView]);
|
||||
|
||||
// Update URL when selectedView changes
|
||||
useEffect(() => {
|
||||
setSearchParams((prev: URLSearchParams) => {
|
||||
prev.set(QueryParams.selectedExplorerView, selectedView);
|
||||
return prev;
|
||||
});
|
||||
}, [selectedView, setSearchParams]);
|
||||
|
||||
const [shouldReset, setShouldReset] = useState(false);
|
||||
|
||||
const [defaultQuery, setDefaultQuery] = useState<Query>(() =>
|
||||
@ -141,6 +132,7 @@ function TracesExplorer(): JSX.Element {
|
||||
}
|
||||
|
||||
setSelectedView(view);
|
||||
|
||||
handleExplorerTabChange(
|
||||
view === ExplorerViews.TIMESERIES ? PANEL_TYPES.TIME_SERIES : view,
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user