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

Function getMutationStatusRank

packages/query-devtools/src/utils.tsx:156–163  ·  view source on GitHub ↗
(m: Mutation)

Source from the content-addressed store, hash-verified

154type MutationSortFn = (a: Mutation, b: Mutation) => number
155
156const getMutationStatusRank = (m: Mutation) =>
157 m.state.isPaused
158 ? 0
159 : m.state.status === 'error'
160 ? 2
161 : m.state.status === 'pending'
162 ? 1
163 : 3
164
165const mutationDateSort: MutationSortFn = (a, b) =>
166 a.state.submittedAt < b.state.submittedAt ? 1 : -1

Callers 1

mutationStatusSortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected