-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add SyntaxErrorView * Tweak copy --------- Co-authored-by: Jeremy Walker <[email protected]>
- Loading branch information
Showing
7 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/javascript/components/bootcamp/SolveExercisePage/ResultsPanel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react' | ||
import { TaskPreview } from './TaskPreview/TaskPreview' | ||
import { InspectedTestResultView } from './TestResultsView/InspectedTestResultView' | ||
import useTestStore from './store/testStore' | ||
import { SyntaxErrorView } from './TestResultsView/SyntaxErrorView' | ||
export function ResultsPanel() { | ||
const { hasSyntaxError } = useTestStore() | ||
|
||
if (hasSyntaxError) { | ||
return <SyntaxErrorView /> | ||
} | ||
|
||
return ( | ||
<> | ||
<InspectedTestResultView /> | ||
<TaskPreview /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/javascript/components/bootcamp/SolveExercisePage/TestResultsView/SyntaxErrorView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { GraphicalIcon } from '@/components/common/GraphicalIcon' | ||
import React from 'react' | ||
|
||
export function SyntaxErrorView() { | ||
return ( | ||
<div className="border-t-1 border-borderColor6"> | ||
<div className="text-center py-40 px-40 max-w-[600px] mx-auto"> | ||
<GraphicalIcon | ||
className={`w-[48px] h-[48px] m-auto mb-20 filter-textColor6`} | ||
icon="bug" | ||
/> | ||
<div className="text-h5 mb-6 text-textColor6"> | ||
Oops! Jiki couldn't understand your code. | ||
</div> | ||
<div className="mb-20 text-textColor6 leading-160 text-16 text-balance"> | ||
No need to panic. Read and fix the error in the message above, then | ||
press "Check Scenarios" to try again. | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters