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

Function mapStateToProps

ui/src/components/Entity/EntityContextLoader.jsx:67–82  ·  view source on GitHub ↗
(state, ownProps)

Source from the content-addressed store, hash-verified

65}
66
67const mapStateToProps = (state, ownProps) => {
68 const { entityId, location } = ownProps;
69 const similarQuery = entitySimilarQuery(location, entityId);
70 const childrenQuery = folderDocumentsQuery(location, entityId, undefined);
71 const expandQuery = entityReferencesQuery(entityId);
72 return {
73 entity: selectEntity(state, entityId),
74 tagsResult: selectEntityTags(state, entityId),
75 similarQuery,
76 similarResult: selectSimilarResult(state, similarQuery),
77 expandQuery,
78 expandResult: selectEntityExpandResult(state, expandQuery),
79 childrenQuery,
80 childrenResult: selectEntitiesResult(state, childrenQuery),
81 };
82};
83
84const mapDispatchToProps = {
85 queryEntities,

Callers

nothing calls this directly

Calls 8

entitySimilarQueryFunction · 0.90
folderDocumentsQueryFunction · 0.90
entityReferencesQueryFunction · 0.90
selectEntityFunction · 0.90
selectEntityTagsFunction · 0.90
selectSimilarResultFunction · 0.90
selectEntityExpandResultFunction · 0.90
selectEntitiesResultFunction · 0.90

Tested by

no test coverage detected