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

Function mapStateToProps

ui/src/components/Entity/EntityViews.jsx:396–411  ·  view source on GitHub ↗
(state, ownProps)

Source from the content-addressed store, hash-verified

394}
395
396const mapStateToProps = (state, ownProps) => {
397 const { entity, location, activeMode } = ownProps;
398 const childrenQuery = folderDocumentsQuery(location, entity.id, undefined);
399 const reference = selectEntityReference(state, entity.id, activeMode);
400 return {
401 reference,
402 references: selectEntityReferences(state, entity.id),
403 referenceQuery: entityReferenceQuery(location, entity, reference),
404 tags: selectEntityTags(state, entity.id),
405 similar: selectSimilarResult(
406 state,
407 entitySimilarQuery(location, entity.id)
408 ),
409 children: selectEntitiesResult(state, childrenQuery),
410 };
411};
412
413export default compose(withRouter, connect(mapStateToProps))(EntityViews);

Callers

nothing calls this directly

Calls 8

folderDocumentsQueryFunction · 0.90
selectEntityReferenceFunction · 0.90
selectEntityReferencesFunction · 0.90
entityReferenceQueryFunction · 0.90
selectEntityTagsFunction · 0.90
selectSimilarResultFunction · 0.90
entitySimilarQueryFunction · 0.90
selectEntitiesResultFunction · 0.90

Tested by

no test coverage detected