Skip to content

Commit

Permalink
ref(browserHistory): Remove from spanDetails/chart (#82609)
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser authored Jan 2, 2025
1 parent d370da3 commit 5fe0bc2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import {t} from 'sentry/locale';
import type {Organization} from 'sentry/types/organization';
import {defined} from 'sentry/utils';
import {trackAnalytics} from 'sentry/utils/analytics';
import {browserHistory} from 'sentry/utils/browserHistory';
import type EventView from 'sentry/utils/discover/eventView';
import type {SpanSlug} from 'sentry/utils/performance/suspectSpans/types';
import {decodeScalar} from 'sentry/utils/queryString';
import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';

import ExclusiveTimeHistogram from './exclusiveTimeHistogram';
import ExclusiveTimeTimeSeries from './exclusiveTimeTimeSeries';
Expand All @@ -35,6 +35,7 @@ enum DisplayModes {
}

function Chart(props: Props) {
const navigate = useNavigate();
const location = useLocation();

const display = decodeScalar(location.query.display, DisplayModes.TIMESERIES);
Expand All @@ -52,7 +53,7 @@ function Chart(props: Props) {
change_to_display: value,
});

browserHistory.push({
navigate({
pathname: location.pathname,
query: {
...location.query,
Expand Down

0 comments on commit 5fe0bc2

Please sign in to comment.