mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 11:26: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>
|
<ListItem>
|
||||||
<ListItemIcon><NumbersIcon/></ListItemIcon>
|
<ListItemIcon><NumbersIcon/></ListItemIcon>
|
||||||
<ListItemText secondary="Your current order"/>
|
<ListItemText primary="No active orders" secondary="Your current order"/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
}
|
}
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<PasswordIcon/>
|
<PasswordIcon/>
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText secondary="Last generated token.">
|
<ListItemText secondary="Your token.">
|
||||||
{this.props.token ?
|
{this.props.token ?
|
||||||
<TextField
|
<TextField
|
||||||
disabled
|
disabled
|
||||||
|
@ -59,10 +59,15 @@ export default class UserGenPage extends Component {
|
|||||||
showRobosat:true,
|
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({
|
this.props.setAppState({
|
||||||
nickname: data.nickname,
|
nickname: data.nickname,
|
||||||
token: this.state.token,
|
token: this.state.token,
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user