MCPcopy Create free account
hub / github.com/emwalker/digraph / showAlerts

Function showAlerts

client/src/components/helpers.ts:17–24  ·  view source on GitHub ↗
(getAlerts: GetAlertsType<R>)

Source from the content-addressed store, hash-verified

15type GetAlertsType<R> = (response: R) => readonly AlertMessageType[]
16
17function showAlerts<R>(getAlerts: GetAlertsType<R>): (response: R) => void {
18 return (response: R) => {
19 const alerts = getAlerts(response)
20 const addMessage = window.flashMessages?.addMessage
21 if (addMessage == null || alerts.length === 0) return
22 alerts.forEach(addMessage)
23 }
24}
25
26export { topicPath, backgroundColor, borderColor, showAlerts }

Callers 2

makeUpsertLinkCallbackFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected