MCPcopy Create free account
hub / github.com/alephdata/aleph / selectNotificationsResult

Function selectNotificationsResult

ui/src/selectors.js:356–371  ·  view source on GitHub ↗
(state, query)

Source from the content-addressed store, hash-verified

354}
355
356export function selectNotificationsResult(state, query) {
357 const model = selectModel(state);
358 const result = selectResult(
359 state,
360 query,
361 (stateInner, id) => stateInner.notifications[id]
362 );
363 result.results.forEach((notif) => {
364 Object.entries(notif.event.params).forEach(([field, type]) => {
365 if (type === 'entity' && notif.params[field]) {
366 notif.params[field] = model.getEntity(notif.params[field]);
367 }
368 });
369 });
370 return result;
371}
372
373export function selectEntitySetsResult(state, query) {
374 return selectResult(state, query, selectEntitySet);

Callers 3

mapStateToPropsFunction · 0.90
mapStateToPropsFunction · 0.90
mapStateToPropsFunction · 0.90

Calls 3

selectModelFunction · 0.85
selectResultFunction · 0.85
getEntityMethod · 0.45

Tested by

no test coverage detected