feat: Style the dashboard topbar actions and user dropdown.

This commit is contained in:
Ahmed Bouhuolia
2020-06-02 19:47:38 +02:00
parent b8eb84d896
commit 79e1752331
12 changed files with 137 additions and 65 deletions

View File

@@ -1,11 +1,13 @@
import { isAuthenticated } from 'store/authentication/authentication.reducer'
import { connect } from 'react-redux';
const mapStateToProps = (state) => {
return {
isAuthorized: isAuthenticated(state),
export default (mapState) => {
const mapStateToProps = (state, props) => {
const mapped = {
isAuthorized: isAuthenticated(state),
user: state.authentication.user,
};
return mapState ? mapState(mapped, state, props) : mapped;
};
};
export default connect(mapStateToProps);
return connect(mapStateToProps);
};