MCPcopy
hub / github.com/agentheroes/agentheroes / dispatch

Function dispatch

apps/frontend/src/hooks/use-toast.tsx:136–141  ·  view source on GitHub ↗
(action: Action)

Source from the content-addressed store, hash-verified

134let memoryState: State = { toasts: [] }
135
136function dispatch(action: Action) {
137 memoryState = reducer(memoryState, action)
138 listeners.forEach((listener) => {
139 listener(memoryState)
140 })
141}
142
143type Toast = Omit<ToasterToast, "id">
144

Callers 9

handleConfirmFunction · 0.85
ValidationComponentFunction · 0.85
handleConfigConfirmFunction · 0.85
handleConfirmDeleteFunction · 0.85
addToRemoveQueueFunction · 0.85
updateFunction · 0.85
dismissFunction · 0.85
toastFunction · 0.85
useToastFunction · 0.85

Calls 1

reducerFunction · 0.85

Tested by

no test coverage detected