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

Function mapStateToProps

ui/src/components/Entity/EntityPreview.jsx:100–114  ·  view source on GitHub ↗
(state, ownProps)

Source from the content-addressed store, hash-verified

98}
99
100const mapStateToProps = (state, ownProps) => {
101 const parsedHash = queryString.parse(ownProps.location.hash);
102 const entityId = parsedHash['preview:id'];
103 const profile = parsedHash['preview:profile'] !== 'false';
104 const activeMode = parsedHash['preview:mode'];
105
106 return {
107 entityId,
108 profile,
109 parsedHash,
110 entity: selectEntity(state, entityId),
111 activeMode: selectEntityView(state, entityId, activeMode, true),
112 locale: selectLocale(state),
113 };
114};
115
116export default compose(withRouter, connect(mapStateToProps))(EntityPreview);

Callers

nothing calls this directly

Calls 3

selectEntityFunction · 0.90
selectEntityViewFunction · 0.90
selectLocaleFunction · 0.90

Tested by

no test coverage detected