File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
static/app/views/profiling/landing Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ import {useLocation} from 'sentry/utils/useLocation';
4747import { useNavigate } from 'sentry/utils/useNavigate' ;
4848import { useOrganization } from 'sentry/utils/useOrganization' ;
4949import { useProjects } from 'sentry/utils/useProjects' ;
50- import { useRouter } from 'sentry/utils/useRouter' ;
5150import type { DataState } from 'sentry/views/profiling/useLandingAnalytics' ;
5251import { getProfileTargetId } from 'sentry/views/profiling/utils' ;
5352
@@ -88,7 +87,6 @@ export function SlowestFunctionsWidget<F extends BreakdownFunction>({
8887 onDataState,
8988} : SlowestFunctionsWidgetProps < F > ) {
9089 const navigate = useNavigate ( ) ;
91- const router = useRouter ( ) ;
9290 const location = useLocation ( ) ;
9391 const organization = useOrganization ( ) ;
9492
@@ -219,11 +217,14 @@ export function SlowestFunctionsWidget<F extends BreakdownFunction>({
219217 onChange = { option => {
220218 setSortFunction ( option . value as SortOption ) ;
221219 setExpandedIndex ( 0 ) ;
222- const newQuery = omit ( router . location . query , [ cursorName ] ) ;
223- router . replace ( {
224- pathname : router . location . pathname ,
225- query : newQuery ,
226- } ) ;
220+ const newQuery = omit ( location . query , [ cursorName ] ) ;
221+ navigate (
222+ {
223+ pathname : location . pathname ,
224+ query : newQuery ,
225+ } ,
226+ { replace : true }
227+ ) ;
227228 } }
228229 trigger = { triggerProps => (
229230 < OverlayTrigger . Button
You can’t perform that action at this time.
0 commit comments