File tree Expand file tree Collapse file tree 5 files changed +15
-25
lines changed
client/src/templates/Challenges Expand file tree Collapse file tree 5 files changed +15
-25
lines changed Original file line number Diff line number Diff line change @@ -392,10 +392,8 @@ function ShowClassic({
392392 block = { block }
393393 challengeDescription = {
394394 < ChallengeDescription
395- block = { block }
396395 description = { description }
397396 instructions = { instructions }
398- superBlock = { superBlock }
399397 />
400398 }
401399 challengeTitle = {
Original file line number Diff line number Diff line change @@ -3,33 +3,21 @@ import React from 'react';
33import PrismFormatted from './prism-formatted' ;
44import './challenge-description.css' ;
55
6- type Challenge = {
7- block ?: string ;
6+ type Props = {
87 description ?: string ;
98 instructions ?: string ;
10- superBlock ?: string ;
119} ;
1210
13- function ChallengeDescription ( challenge : Challenge ) : JSX . Element {
14- const sbClass = challenge . superBlock ? challenge . superBlock : '' ;
15- const bClass = challenge . block ? challenge . block : '' ;
16-
17- return (
18- < div
19- className = { `challenge-instructions ${ sbClass } ${ bClass } ` }
20- data-playwright-test-label = 'challenge-description'
21- >
22- { challenge . description && < PrismFormatted text = { challenge . description } /> }
23- { challenge . instructions && (
24- < >
25- < hr />
26- < PrismFormatted text = { challenge . instructions } />
27- </ >
28- ) }
29- < hr />
30- </ div >
31- ) ;
32- }
11+ const ChallengeDescription = ( { description, instructions } : Props ) => (
12+ < div
13+ className = { 'challenge-instructions' }
14+ data-playwright-test-label = 'challenge-description'
15+ >
16+ { description && < PrismFormatted text = { description } /> }
17+ { instructions && description && < hr /> }
18+ { instructions && < PrismFormatted text = { instructions } /> }
19+ </ div >
20+ ) ;
3321
3422ChallengeDescription . displayName = 'ChallengeDescription' ;
3523
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { SuperBlocks } from '../../../../../shared/config/curriculum';
88import { initializeMathJax } from '../../../utils/math-jax' ;
99import { challengeTestsSelector } from '../redux/selectors' ;
1010import { openModal } from '../redux/actions' ;
11+ import { Spacer } from '../../../components/helpers' ;
1112import TestSuite from './test-suite' ;
1213
1314import './side-panel.css' ;
@@ -83,6 +84,7 @@ export function SidePanel({
8384 </ p >
8485 ) }
8586 { challengeDescription }
87+ < Spacer size = 'medium' />
8688 { toolPanel }
8789 < TestSuite tests = { tests } />
8890 </ div >
Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ class BackEnd extends Component<BackEndProps> {
242242 description = { description }
243243 instructions = { instructions }
244244 />
245+ < Spacer size = 'medium' />
245246 < SolutionForm
246247 challengeType = { challengeType }
247248 // eslint-disable-next-line @typescript-eslint/unbound-method
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ class Project extends Component<ProjectProps> {
197197 description = { description }
198198 instructions = { instructions }
199199 />
200+ < Spacer size = 'medium' />
200201 < SolutionForm
201202 challengeType = { challengeType }
202203 description = { description }
You can’t perform that action at this time.
0 commit comments