diff --git a/client/src/components/Header/index.js b/client/src/components/Header/index.js index 18c24ed4b9..8565b09a0d 100644 --- a/client/src/components/Header/index.js +++ b/client/src/components/Header/index.js @@ -30,12 +30,16 @@ class Header extends Component { - - - - - {disableSettings ? null : } - + {matches => + matches && ( + + + + + {disableSettings ? null : } + + ) + } @@ -58,16 +62,20 @@ class Header extends Component { - - - - - - {disableSettings ? null : } - - Menu - - + + {matches => + matches && ( + + + + + {disableSettings ? null : } + + Menu + + + ) + } ); diff --git a/client/src/templates/Challenges/classic/MobileLayout.js b/client/src/templates/Challenges/classic/MobileLayout.js index 65f41f9cdc..95a9c17ab7 100644 --- a/client/src/templates/Challenges/classic/MobileLayout.js +++ b/client/src/templates/Challenges/classic/MobileLayout.js @@ -5,10 +5,7 @@ import { connect } from 'react-redux'; import ToolPanel from '../components/Tool-Panel'; import { createStructuredSelector } from 'reselect'; -import { - currentTabSelector, - moveToTab, -} from '../redux'; +import { currentTabSelector, moveToTab } from '../redux'; import { bindActionCreators } from 'redux'; const mapStateToProps = createStructuredSelector({ @@ -18,24 +15,23 @@ const mapStateToProps = createStructuredSelector({ const mapDispatchToProps = dispatch => bindActionCreators( { - moveToTab, + moveToTab }, dispatch ); const propTypes = { - moveToTab: PropTypes.func, currentTab: PropTypes.number, - instructions: PropTypes.element, editor: PropTypes.element, - testOutput: PropTypes.element, - hasPreview: PropTypes.bool, - preview: PropTypes.element, guideUrl: PropTypes.string, + hasPreview: PropTypes.bool, + instructions: PropTypes.element, + moveToTab: PropTypes.func, + preview: PropTypes.element, + testOutput: PropTypes.element, videoUrl: PropTypes.string }; - class MobileLayout extends Component { render() { const { @@ -60,21 +56,17 @@ class MobileLayout extends Component { moveToTab(key)} - > + id='challenge-page-tabs' + onSelect={moveToTab} + > - { instructions } + {instructions} - - {editor} - + {editor} - - {testOutput} - + {testOutput} {hasPreview && ( @@ -82,11 +74,7 @@ class MobileLayout extends Component { )} - + ); } @@ -95,4 +83,7 @@ class MobileLayout extends Component { MobileLayout.displayName = 'MobileLayout'; MobileLayout.propTypes = propTypes; -export default connect(mapStateToProps, mapDispatchToProps)(MobileLayout); +export default connect( + mapStateToProps, + mapDispatchToProps +)(MobileLayout); diff --git a/client/src/templates/Challenges/classic/Show.js b/client/src/templates/Challenges/classic/Show.js index e1a3255ac3..aff229f80e 100644 --- a/client/src/templates/Challenges/classic/Show.js +++ b/client/src/templates/Challenges/classic/Show.js @@ -72,7 +72,7 @@ const propTypes = { output: PropTypes.string, pageContext: PropTypes.shape({ challengeMeta: PropTypes.shape({ - nextchallengePath: PropTypes.string + nextChallengePath: PropTypes.string }) }), tests: PropTypes.arrayOf( @@ -178,7 +178,9 @@ class ShowClassic extends Component { } getGuideUrl() { - const {fields: { slug }} = this.getChallenge(); + const { + fields: { slug } + } = this.getChallenge(); return createGuideUrl(slug); } @@ -201,7 +203,7 @@ class ShowClassic extends Component { const { fields: { blockName }, description, - instructions, + instructions } = this.getChallenge(); return ( @@ -221,8 +223,8 @@ class ShowClassic extends Component { renderEditor() { const { files } = this.props; const challengeFile = first(Object.keys(files).map(key => files[key])); - return challengeFile && ( - + return ( + challengeFile && ); } @@ -230,7 +232,7 @@ class ShowClassic extends Component { const { output } = this.props; return ( + ); } @@ -255,31 +254,33 @@ class ShowClassic extends Component { - + {matches => - matches - ? ( - - ) - : ( - - ) + matches ? ( + + ) : ( + + ) } diff --git a/client/src/templates/Challenges/classic/classic.css b/client/src/templates/Challenges/classic/classic.css index 33a096045b..f3a6f13452 100644 --- a/client/src/templates/Challenges/classic/classic.css +++ b/client/src/templates/Challenges/classic/classic.css @@ -31,21 +31,21 @@ letter-spacing: 0.02em; } -#challege-page-tabs .nav-tabs { +#challenge-page-tabs .nav-tabs { margin-left: 2px; display: flex; } -#challege-page-tabs .nav-tabs > li { +#challenge-page-tabs .nav-tabs > li { flex: 1; text-align: center; } -#challege-page-tabs .nav-tabs > li > a { +#challenge-page-tabs .nav-tabs > li > a { padding: 5px 10px; } -.challege-edittor-wrapper { +.challenge-editor-wrapper { height: calc(100vh - 112px); overflow: hidden; } diff --git a/client/src/templates/Challenges/components/completion-modal.css b/client/src/templates/Challenges/components/completion-modal.css index 0970bdc871..6f2a6563d6 100644 --- a/client/src/templates/Challenges/components/completion-modal.css +++ b/client/src/templates/Challenges/components/completion-modal.css @@ -10,7 +10,7 @@ width: 30vh; } -@media screen, (max-width: 767px) { +@media screen and (max-width: 767px) { .challenge-success-modal .btn-lg { font-size: 16px; } diff --git a/client/src/templates/Challenges/components/help-modal.css b/client/src/templates/Challenges/components/help-modal.css index ac54f7f115..3dde5ac671 100644 --- a/client/src/templates/Challenges/components/help-modal.css +++ b/client/src/templates/Challenges/components/help-modal.css @@ -1,4 +1,4 @@ -@media screen, (max-width: 767px) { +@media screen and (max-width: 767px) { .help-modal .btn-lg { font-size: 16px; } diff --git a/client/src/templates/Challenges/components/reset-modal.css b/client/src/templates/Challenges/components/reset-modal.css index 76a560e495..d6b83e93e0 100644 --- a/client/src/templates/Challenges/components/reset-modal.css +++ b/client/src/templates/Challenges/components/reset-modal.css @@ -10,7 +10,7 @@ text-shadow: none; } -@media screen, (max-width: 767px) { +@media screen and (max-width: 767px) { .reset-modal .btn-lg { font-size: 16px; } diff --git a/client/src/templates/Introduction/intro.css b/client/src/templates/Introduction/intro.css index 1e82af8973..2c57d6684e 100644 --- a/client/src/templates/Introduction/intro.css +++ b/client/src/templates/Introduction/intro.css @@ -1,4 +1,4 @@ -@media screen, (max-width: 767px) { +@media screen and (max-width: 767px) { .intro-layout-container { padding: 0 10px; }