Skip to content

Commit

Permalink
Simplify messages shown with no prev submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
n8kim1 committed Dec 29, 2020
1 parent d0b6b50 commit e1819e4
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions frontend/src/views/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,11 @@ class Submissions extends Component {
</p>
)
} else if (this.state.currentSubmission.length == 0) {
if (this.state.status == 0) {
return (
<p>
Your code is being submitted -- you'll see it here if it finishes successfully.
</p>
)
} else {
return (
<p>
You haven't submitted any code yet!
</p>
)
}
return (
<p>
You haven't submitted any code yet!
</p>
)
} else {
const submissionRows = this.state.currentSubmission.map((submission, index) => {
if (Object.keys(submission).length === 0) {
Expand Down Expand Up @@ -400,19 +392,11 @@ class Submissions extends Component {
</p>
)
} else if (this.state.lastSubmissions.length == 0) {
if (this.state.status == 0) {
return (
<p>
Your code is being submitted -- you'll see it here if it finishes successfully.
</p>
)
} else {
return (
<p>
You haven't submitted any code yet!
</p>
)
}
return (
<p>
You haven't had any successful submissions yet! (If you have code being submitted, you'll see it here if it finishes successfully.)
</p>
)
} else {
const submissionRows = this.state.lastSubmissions.map((submission, index) => {
if (Object.keys(submission).length === 0) {
Expand Down

0 comments on commit e1819e4

Please sign in to comment.