mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
redux: fixed estimated
This commit is contained in:
parent
185fe80fc5
commit
5d2c534aa9
6 changed files with 30 additions and 38 deletions
|
@ -91,18 +91,7 @@ export class Component extends React.PureComponent<Props, void> {
|
|||
}
|
||||
|
||||
|
||||
function mapStateToProps(state) {
|
||||
const { user: { user } } = state;
|
||||
const mapStateToProps = ({ user: { user } }) => ({ user });
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({ setUser, userLogout }, dispatch);
|
||||
|
||||
return { user };
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({
|
||||
setUser,
|
||||
userLogout,
|
||||
}, dispatch);
|
||||
|
||||
export const UserPanel = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Component);
|
||||
export const UserPanel = connect(mapStateToProps, mapDispatchToProps)(Component);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue