MCPcopy Create free account
hub / github.com/TanStack/query / statusAndDateSort

Function statusAndDateSort

packages/query-devtools/src/utils.tsx:109–115  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

107}
108
109const statusAndDateSort: SortFn = (a, b) => {
110 if (getStatusRank(a) === getStatusRank(b)) {
111 return dateSort(a, b)
112 }
113
114 return getStatusRank(a) > getStatusRank(b) ? 1 : -1
115}
116
117export const sortFns: Record<string, SortFn> = {
118 status: statusAndDateSort,

Callers

nothing calls this directly

Calls 2

getStatusRankFunction · 0.85
dateSortFunction · 0.70

Tested by

no test coverage detected