mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
13 lines
411 B
JavaScript
13 lines
411 B
JavaScript
import { isAuthenticated } from 'store/authentication/authentication.reducer'
|
|
import { connect } from 'react-redux';
|
|
|
|
export default (mapState) => {
|
|
const mapStateToProps = (state, props) => {
|
|
const mapped = {
|
|
isAuthorized: isAuthenticated(state),
|
|
user: state.authentication.user,
|
|
};
|
|
return mapState ? mapState(mapped, state, props) : mapped;
|
|
};
|
|
return connect(mapStateToProps);
|
|
}; |