From d1244e98395ab43e4cd0fd51fec0441126393540 Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Fri, 27 Dec 2024 16:40:19 -0500 Subject: [PATCH] ref(browserHistory): Remove from transactionEvents --- .../transactionSummary/transactionEvents/content.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/app/views/performance/transactionSummary/transactionEvents/content.tsx b/static/app/views/performance/transactionSummary/transactionEvents/content.tsx index f3d4c85878404e..a34a26f3e535f7 100644 --- a/static/app/views/performance/transactionSummary/transactionEvents/content.tsx +++ b/static/app/views/performance/transactionSummary/transactionEvents/content.tsx @@ -16,12 +16,12 @@ import {space} from 'sentry/styles/space'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; import {trackAnalytics} from 'sentry/utils/analytics'; -import {browserHistory} from 'sentry/utils/browserHistory'; import type EventView from 'sentry/utils/discover/eventView'; import {SavedQueryDatasets} from 'sentry/utils/discover/types'; import type {WebVital} from 'sentry/utils/fields'; import {decodeScalar} from 'sentry/utils/queryString'; import projectSupportsReplay from 'sentry/utils/replays/projectSupportsReplay'; +import {useNavigate} from 'sentry/utils/useNavigate'; import {useRoutes} from 'sentry/utils/useRoutes'; import {hasDatasetSelector} from 'sentry/views/dashboards/utils'; import {useDomainViewFilters} from 'sentry/views/insights/pages/useFilters'; @@ -185,6 +185,8 @@ function Search(props: Props) { percentileValues, } = props; + const navigate = useNavigate(); + const handleSearch = (query: string) => { const queryParams = normalizeDateTimeParams({ ...(location.query || {}), @@ -194,7 +196,7 @@ function Search(props: Props) { // do not propagate pagination when making a new search const searchQueryParams = omit(queryParams, 'cursor'); - browserHistory.push({ + navigate({ pathname: location.pathname, query: searchQueryParams, });