Fix movements ui when erroring.
This commit is contained in:
parent
969e0b1ae7
commit
a369c4978d
|
@ -26,14 +26,16 @@ class MovementsPage extends React.Component {
|
|||
|
||||
handleTable() {
|
||||
if (this.state.movements !== undefined) {
|
||||
return <ul>{this.state.movements.map(movs => <li key={movs.time}>{movs.time} - {movs.type}</li>)}</ul>;
|
||||
const table =
|
||||
<ul>{this.state.movements.map(movs => <li key={movs.time}>{movs.time} - {movs.type}</li>)}</ul>;
|
||||
return <ModalBox title="Movements" data={table} />;
|
||||
} else {
|
||||
return Empty;
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const movements = <ModalBox title="Movements" data={this.handleTable()} />;
|
||||
const movements = this.handleTable();
|
||||
|
||||
if (this.state.error) {
|
||||
return Error;
|
||||
|
|
Loading…
Reference in New Issue
Block a user