mirror of
https://github.com/wassname/talk.git
synced 2026-08-08 11:28:12 +08:00
Use more selectors
This commit is contained in:
@@ -2,9 +2,10 @@ 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 = ({ auth }) => ({
|
||||
user: auth.user,
|
||||
const mapStateToProps = state => ({
|
||||
username: usernameSelector(state),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({ logout }, dispatch);
|
||||
|
||||
Reference in New Issue
Block a user