mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: Style the dashboard topbar actions and user dropdown.
This commit is contained in:
@@ -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);
|
||||
};
|
||||
@@ -7,10 +7,11 @@ import {
|
||||
inviteMetaByToken,
|
||||
} from 'store/authentication/authentication.actions';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import t from 'store/types';
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
requestLogin: (form) => dispatch(login({ form })),
|
||||
requestLogout: () => dispatch({ type: t.LOGOUT }),
|
||||
requestRegister: (form) => dispatch(register({ form })),
|
||||
requestSendResetPassword: (email) => dispatch(sendResetPassword({ email })),
|
||||
requestResetPassword: (form, token) => dispatch(resetPassword({ form, token })),
|
||||
|
||||
Reference in New Issue
Block a user