Fix order of command
This commit is contained in:
parent
2d847b9e7c
commit
18253886fb
|
@ -65,7 +65,7 @@ export const processes = {
|
|||
export const COMMANDS = createRequestTypes('COMMANDS');
|
||||
export const commands = {
|
||||
post: (command) => action(COMMANDS[REQUEST], {command}),
|
||||
success: (command) => action(COMMANDS[SUCCESS], {commands: [command]}),
|
||||
success: (command) => action(COMMANDS[SUCCESS], {commands: [{timestamp: new Date().getTime(), ...command}]}),
|
||||
failure: (error) => action(COMMANDS[FAILURE], {error})
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
.console--results {
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ class Console extends Component {
|
|||
}
|
||||
|
||||
handleChange(event) {
|
||||
event.preventDefault();
|
||||
this.setState({value: event.target.value});
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@ const sorter = {
|
|||
},
|
||||
messages: function(a, b) {
|
||||
return a.time - b.time;
|
||||
},
|
||||
commands: function(a, b) {
|
||||
return b.timestamp - a.timestamp;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue