File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
static/app/components/replays/table Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1- import { useCallback , useRef } from 'react' ;
1+ import { useCallback } from 'react' ;
22
33import { trackAnalytics } from 'sentry/utils/analytics' ;
44import { encodeSort } from 'sentry/utils/discover/eventView' ;
@@ -12,18 +12,17 @@ interface Props {
1212 queryParamKey ?: string ;
1313}
1414
15- const DEFAULT_SORT = { field : 'started_at' , kind : 'asc ' } as const ;
15+ const DEFAULT_SORT = { field : 'started_at' , kind : 'desc ' } as const ;
1616
1717export default function useReplayTableSort ( {
1818 defaultSort = DEFAULT_SORT ,
1919 queryParamKey = 'sort' ,
2020} : Props = { } ) {
21- const defaultSortRef = useRef ( defaultSort ) ;
2221 const organization = useOrganization ( ) ;
2322
24- const { getParamValue, setParamValue} = useUrlParams ( queryParamKey , '-started_at ' ) ;
23+ const { getParamValue, setParamValue} = useUrlParams ( queryParamKey , '' ) ;
2524 const sortQuery = getParamValue ( ) ;
26- const sortType = decodeSorts ( sortQuery ) . at ( 0 ) ?? defaultSortRef . current ;
25+ const sortType = decodeSorts ( sortQuery ) . at ( 0 ) ?? defaultSort ;
2726
2827 const handleSortClick = useCallback (
2928 ( key : string ) => {
You can’t perform that action at this time.
0 commit comments