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

Function mapStateToProps

ui/src/components/Collection/CollectionWrapper.jsx:111–124  ·  view source on GitHub ↗
(state, ownProps)

Source from the content-addressed store, hash-verified

109}
110
111const mapStateToProps = (state, ownProps) => {
112 const { collection, collectionId: id, location, forceCasefile } = ownProps;
113 const collectionId = id || collection?.id;
114 const isCasefile = forceCasefile || collection?.casefile;
115 const collectionStatus = selectCollection(state, collectionId)?.status;
116 const query = collectionSearchQuery(location, collectionId);
117
118 return {
119 collectionId,
120 collection: { ...collection, status: collectionStatus },
121 isCasefile,
122 query,
123 };
124};
125
126export default compose(
127 withRouter,

Callers

nothing calls this directly

Calls 2

selectCollectionFunction · 0.90
collectionSearchQueryFunction · 0.90

Tested by

no test coverage detected