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

Function mapStateToProps

ui/src/components/Entity/EntitySimilarMode.jsx:183–191  ·  view source on GitHub ↗
(state, ownProps)

Source from the content-addressed store, hash-verified

181}
182
183const mapStateToProps = (state, ownProps) => {
184 const { entity, location } = ownProps;
185 const query = entitySimilarQuery(location, entity.id);
186 const result = selectSimilarResult(state, query);
187
188 const parsedHash = queryString.parse(location.hash);
189
190 return { query, result, selectedIndex: +parsedHash.selectedIndex };
191};
192
193EntitySimilarMode = connect(mapStateToProps, {
194 querySimilar,

Callers

nothing calls this directly

Calls 2

entitySimilarQueryFunction · 0.90
selectSimilarResultFunction · 0.90

Tested by

no test coverage detected