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

Function getMutationStatusColor

packages/query-devtools/src/utils.tsx:49–65  ·  view source on GitHub ↗
({
  status,
  isPaused,
}: {
  status: Mutation['state']['status']
  isPaused: boolean
})

Source from the content-addressed store, hash-verified

47}
48
49export function getMutationStatusColor({
50 status,
51 isPaused,
52}: {
53 status: Mutation['state']['status']
54 isPaused: boolean
55}) {
56 return isPaused
57 ? 'purple'
58 : status === 'error'
59 ? 'red'
60 : status === 'pending'
61 ? 'yellow'
62 : status === 'success'
63 ? 'green'
64 : 'gray'
65}
66
67export function getQueryStatusColorByLabel(label: QueryStatusLabel) {
68 return label === 'fresh'

Callers 3

MutationRowFunction · 0.90
MutationStatusCountFunction · 0.90
MutationDetailsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…