mirror of
https://github.com/wassname/talk.git
synced 2026-08-15 12:55:10 +08:00
Refactor talk-plugin-auth part 1
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { logout } from 'coral-framework/actions/auth';
|
||||
import UserBox from '../components/UserBox';
|
||||
|
||||
const mapStateToProps = ({ auth }) => ({
|
||||
user: auth.user,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({ logout }, dispatch);
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(UserBox);
|
||||
Reference in New Issue
Block a user