Skip to content

Commit

Permalink
ref(browserHistory): Remove from performance/searchBar (#82596)
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser authored Jan 2, 2025
1 parent 29bfbb1 commit 3c1b01f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/app/components/performance/searchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import {DEFAULT_DEBOUNCE_DURATION} from 'sentry/constants';
import {t} from 'sentry/locale';
import type {Organization} from 'sentry/types/organization';
import {trackAnalytics} from 'sentry/utils/analytics';
import {browserHistory} from 'sentry/utils/browserHistory';
import type EventView from 'sentry/utils/discover/eventView';
import {doDiscoverQuery} from 'sentry/utils/discover/genericDiscoverQuery';
import {parsePeriodToHours} from 'sentry/utils/duration/parsePeriodToHours';
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
import normalizeUrl from 'sentry/utils/url/normalizeUrl';
import useApi from 'sentry/utils/useApi';
import {useNavigate} from 'sentry/utils/useNavigate';
import useOnClickOutside from 'sentry/utils/useOnClickOutside';
import {transactionSummaryRouteWithQuery} from 'sentry/views/performance/transactionSummary/utils';

Expand Down Expand Up @@ -45,6 +44,7 @@ function SearchBar(props: SearchBarProps) {
additionalConditions,
} = props;

const navigate = useNavigate();
const [searchResults, setSearchResults] = useState<SearchGroup[]>([]);
const transactionCount = searchResults[0]?.children?.length || 0;
const [highlightedItemIndex, setHighlightedItemIndex] = useState(-1);
Expand Down Expand Up @@ -238,7 +238,7 @@ function SearchBar(props: SearchBarProps) {
query,
});

browserHistory.push(normalizeUrl(next));
navigate(next);
};
const logDocsOpenedEvent = () => {
trackAnalytics('search.docs_opened', {
Expand Down

0 comments on commit 3c1b01f

Please sign in to comment.