mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
wip
This commit is contained in:
@@ -323,7 +323,7 @@ export const checkLogin = () => (dispatch, _, {rest, client, pym, storage}) => {
|
||||
pym.sendMessage('coral-auth-changed', JSON.stringify(result.user));
|
||||
|
||||
// Display create username dialog if necessary.
|
||||
if (can(result.user, 'EDIT_NAME') && !get(result.user, 'status.banned.status')) {
|
||||
if (can(result.user, 'EDIT_NAME') && get(result.user, 'status.banned.status')) {
|
||||
dispatch(showCreateUsernameDialog());
|
||||
}
|
||||
})
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
invalidForm,
|
||||
validForm,
|
||||
createUsername
|
||||
} from 'coral-framework/actions/auth';
|
||||
} from 'coral-embed-stream/src/actions/auth';
|
||||
|
||||
class ChangeUsernameContainer extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -129,10 +129,11 @@ ChangeUsernameContainer.propTypes = {
|
||||
validForm: PropTypes.func,
|
||||
invalidForm: PropTypes.func,
|
||||
loggedIn: PropTypes.bool,
|
||||
changeUsername: PropTypes.func,
|
||||
};
|
||||
|
||||
const mapStateToProps = ({auth}) => ({
|
||||
auth: auth.toJS()
|
||||
auth: auth
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) =>
|
||||
@@ -150,4 +151,3 @@ const mapDispatchToProps = (dispatch) =>
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(
|
||||
ChangeUsernameContainer
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user