Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ class App extends Component {
})
}

/**
* Downloads the currently displayed source code to the user's desktop.
*/
downloadCode = () => {
// TODO: Code to download source code.
}
Expand All @@ -164,14 +167,9 @@ class App extends Component {
// Before processing the new result, we must pop the message 'Running your code...' off and re-enable the button.
this.setFinishedStatus()

// Will only keep the latest 10 results in the logs.
// TODO: Keep only a specific amount of logs.
let currentResults = this.state.results

// Most recent results are at the top, remove the element at the end if we exceed 10 logs.
if (currentResults.length >= 10) {
currentResults.pop()
}

if (result['build'] === true) {
currentResults.unshift('[' + languages[this.state.language] + '] Build successfully completed!\nStandard output:\n' + result['message'])
} else {
Expand Down