MCPcopy Create free account
hub / github.com/TanStack/devtools / getBadgeText

Function getBadgeText

packages/devtools/src/tabs/marketplace/card-utils.ts:67–85  ·  view source on GitHub ↗
(card: PluginCard)

Source from the content-addressed store, hash-verified

65 }
66}
67
68export const getBadgeText = (card: PluginCard): string => {
69 switch (card.actionType) {
70 case 'install':
71 case 'install-devtools':
72 return 'Available'
73 case 'add-to-devtools':
74 return 'Installed'
75 case 'already-installed':
76 return 'Active'
77 case 'version-mismatch':
78 return 'Incompatible'
79 case 'requires-package':
80 return 'Unavailable'
81 case 'wrong-framework':
82 return 'Other Framework'
83 default:
84 return ''
85 }
86}

Callers 2

card-utils.test.tsFile · 0.90
PluginCardComponentFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected