fix: wrap backend and project in Hotkeys

Co-authored-by: moT01 <tmondloch01@gmail.com>
pull/36842/head
Oliver Eyton-Williams 2019-09-18 19:02:40 +02:00 committed by mrugesh
parent c91393d737
commit af1008f4e5
2 changed files with 85 additions and 90 deletions

View File

@ -185,13 +185,13 @@ export class BackEnd extends Component {
const blockNameTitle = `${blockName} - ${title}`; const blockNameTitle = `${blockName} - ${title}`;
return ( return (
<LearnLayout>
<Helmet title={`${blockNameTitle} | Learn | freeCodeCamp.org`} />
<Hotkeys <Hotkeys
introPath={introPath} introPath={introPath}
nextChallengePath={nextChallengePath} nextChallengePath={nextChallengePath}
prevChallengePath={prevChallengePath} prevChallengePath={prevChallengePath}
/> >
<LearnLayout>
<Helmet title={`${blockNameTitle} | Learn | freeCodeCamp.org`} />
<Grid> <Grid>
<Row> <Row>
<Col md={8} mdOffset={2} sm={10} smOffset={1} xs={12}> <Col md={8} mdOffset={2} sm={10} smOffset={1} xs={12}>
@ -246,6 +246,7 @@ export class BackEnd extends Component {
</Row> </Row>
</Grid> </Grid>
</LearnLayout> </LearnLayout>
</Hotkeys>
); );
} }
} }

View File

@ -110,25 +110,18 @@ export class Project extends Component {
const blockNameTitle = `${blockName} - ${title}`; const blockNameTitle = `${blockName} - ${title}`;
return ( return (
<LearnLayout>
<Hotkeys <Hotkeys
introPath={introPath} introPath={introPath}
nextChallengePath={nextChallengePath} nextChallengePath={nextChallengePath}
prevChallengePath={prevChallengePath} prevChallengePath={prevChallengePath}
/> >
<LearnLayout>
<Helmet title={`${blockNameTitle} | Learn | freeCodeCamp.org`} /> <Helmet title={`${blockNameTitle} | Learn | freeCodeCamp.org`} />
<Grid> <Grid>
<Row> <Row>
<Col md={8} mdOffset={2} sm={10} smOffset={1} xs={12}> <Col md={8} mdOffset={2} sm={10} smOffset={1} xs={12}>
<Spacer /> <Spacer />
<ChallengeTitle <ChallengeTitle>{blockNameTitle}</ChallengeTitle>
introPath={introPath}
nextChallengePath={nextChallengePath}
prevChallengePath={prevChallengePath}
showPrevNextBtns={true}
>
{blockNameTitle}
</ChallengeTitle>
<ChallengeDescription description={description} /> <ChallengeDescription description={description} />
<ProjectForm <ProjectForm
isFrontEnd={isFrontEnd} isFrontEnd={isFrontEnd}
@ -146,6 +139,7 @@ export class Project extends Component {
</Row> </Row>
</Grid> </Grid>
</LearnLayout> </LearnLayout>
</Hotkeys>
); );
} }
} }