MCPcopy
hub / github.com/TanStack/query / statusAndDateSort

Function statusAndDateSort

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getStatusRankFunction · 0.85
dateSortFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…