mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
add name change for planet & fix minor bugs
This commit is contained in:
@@ -27,6 +27,8 @@ module.exports = React.createClass({
|
||||
this.unsubscribe()
|
||||
},
|
||||
onListen: function (res) {
|
||||
if (res.status == null) return
|
||||
|
||||
if (res.status === 'planetCreated') {
|
||||
var currentUser = this.state.currentUser
|
||||
currentUser.Planets.push(res.data)
|
||||
@@ -34,6 +36,10 @@ module.exports = React.createClass({
|
||||
localStorage.setItem('user', JSON.stringify(currentUser))
|
||||
this.setState({currentUser: currentUser})
|
||||
}
|
||||
|
||||
if (res.status === 'nameChanged') {
|
||||
this.setState({currentUser: AuthStore.getUser()})
|
||||
}
|
||||
},
|
||||
render: function () {
|
||||
var currentPlanetName = this.props.params.planetName
|
||||
|
||||
Reference in New Issue
Block a user