mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 18:45:55 +08:00
17 lines
501 B
JavaScript
17 lines
501 B
JavaScript
import { connect } from 'react-redux';
|
|
import { bindActionCreators } from 'redux';
|
|
import { logout } from 'plugin-api/beta/client/actions/auth';
|
|
import UserBox from '../components/UserBox';
|
|
import { usernameSelector } from 'plugin-api/beta/client/selectors/auth';
|
|
|
|
const mapStateToProps = state => ({
|
|
username: usernameSelector(state),
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => bindActionCreators({ logout }, dispatch);
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(UserBox);
|