From c7a898bed70c2b7b0968805a39b69a1de8df148e Mon Sep 17 00:00:00 2001 From: Irina Brennen Date: Sun, 7 Jan 2018 18:01:01 -0600 Subject: [PATCH] refactor(seed): Add link to guide Partially #16388 --- common/app/routes/Challenges/Side-Panel.jsx | 8 ++++-- common/app/routes/Challenges/Tool-Panel.jsx | 16 +++++++++++ common/app/routes/Challenges/redux/index.js | 1 - common/models/challenge.json | 4 +++ .../applied-accessibility.json | 3 ++- .../01-responsive-web-design/basic-css.json | 18 ++++++++----- .../basic-html-and-html5.json | 9 ++++--- .../basic-javascript.json | 27 ++++++++++++------- .../intermediate-algorithm-scripting.json | 3 ++- .../03-front-end-libraries/bootstrap.json | 3 ++- 10 files changed, 68 insertions(+), 24 deletions(-) diff --git a/common/app/routes/Challenges/Side-Panel.jsx b/common/app/routes/Challenges/Side-Panel.jsx index bc6d87d408..0d23b36771 100644 --- a/common/app/routes/Challenges/Side-Panel.jsx +++ b/common/app/routes/Challenges/Side-Panel.jsx @@ -47,7 +47,7 @@ const mapStateToProps = createSelector( hintIndexSelector, codeLockedSelector, ( - { description }, + { description, guideUrl }, { title }, tests, output, @@ -55,6 +55,7 @@ const mapStateToProps = createSelector( isCodeLocked, ) => ({ title, + guideUrl, description, tests, output, @@ -64,6 +65,7 @@ const mapStateToProps = createSelector( const propTypes = { description: PropTypes.arrayOf(PropTypes.string), executeChallenge: PropTypes.func, + guideUrl: PropTypes.string, hint: PropTypes.string, isCodeLocked: PropTypes.bool, makeToast: PropTypes.func, @@ -127,7 +129,8 @@ export class SidePanel extends PureComponent { openBugModal, openHelpModal, isCodeLocked, - unlockUntrustedCode + unlockUntrustedCode, + guideUrl } = this.props; return (
+ {guideUrl && +
+ +
+
+ }