fix(client): learn layout on mobile

This commit is contained in:
Valeriy S
2019-05-14 17:37:13 +03:00
committed by mrugesh
parent 6b46736801
commit 672184d0c3

View File

@ -250,33 +250,30 @@ class ShowClassic extends Component {
title={`Learn ${this.getBlockNameTitle()} | freeCodeCamp.org`} title={`Learn ${this.getBlockNameTitle()} | freeCodeCamp.org`}
/> />
<Media maxWidth={MAX_MOBILE_WIDTH}> <Media maxWidth={MAX_MOBILE_WIDTH}>
{matches => <MobileLayout
matches ? ( editor={this.renderEditor()}
<MobileLayout guideUrl={this.getGuideUrl()}
editor={this.renderEditor()} hasPreview={this.hasPreview()}
guideUrl={this.getGuideUrl()} instructions={this.renderInstructionsPanel({
hasPreview={this.hasPreview()} showToolPanel: false
instructions={this.renderInstructionsPanel({ })}
showToolPanel: false preview={this.renderPreview()}
})} testOutput={this.renderTestOutput()}
preview={this.renderPreview()} videoUrl={this.getVideoUrl()}
testOutput={this.renderTestOutput()} />
videoUrl={this.getVideoUrl()} </Media>
/> <Media minWidth={MAX_MOBILE_WIDTH + 1}>
) : ( <DesktopLayout
<DesktopLayout challengeFile={this.getChallengeFile()}
challengeFile={this.getChallengeFile()} editor={this.renderEditor()}
editor={this.renderEditor()} hasPreview={this.hasPreview()}
hasPreview={this.hasPreview()} instructions={this.renderInstructionsPanel({
instructions={this.renderInstructionsPanel({ showToolPanel: true
showToolPanel: true })}
})} preview={this.renderPreview()}
preview={this.renderPreview()} resizeProps={this.resizeProps}
resizeProps={this.resizeProps} testOutput={this.renderTestOutput()}
testOutput={this.renderTestOutput()} />
/>
)
}
</Media> </Media>
<CompletionModal /> <CompletionModal />
<HelpModal /> <HelpModal />