mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 10:56:24 +00:00
Implement stopper for bad token push into state
This commit is contained in:
parent
4eb136c249
commit
c21e230c76
@ -217,14 +217,14 @@ export default class BottomBar extends Component {
|
||||
:
|
||||
<ListItem>
|
||||
<ListItemIcon><NumbersIcon/></ListItemIcon>
|
||||
<ListItemText secondary="Your current order"/>
|
||||
<ListItemText primary="No active orders" secondary="Your current order"/>
|
||||
</ListItem>
|
||||
}
|
||||
<ListItem>
|
||||
<ListItemIcon>
|
||||
<PasswordIcon/>
|
||||
</ListItemIcon>
|
||||
<ListItemText secondary="Last generated token.">
|
||||
<ListItemText secondary="Your token.">
|
||||
{this.props.token ?
|
||||
<TextField
|
||||
disabled
|
||||
|
@ -59,10 +59,15 @@ export default class UserGenPage extends Component {
|
||||
showRobosat:true,
|
||||
})
|
||||
&
|
||||
// Add nick and token to App state (token only if not a bad request)
|
||||
(data.bad_request ? this.props.setAppState({
|
||||
nickname: data.nickname,
|
||||
})
|
||||
:
|
||||
this.props.setAppState({
|
||||
nickname: data.nickname,
|
||||
token: this.state.token,
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user