Skip to content

Commit

Permalink
updated results copy
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilt committed Jul 9, 2018
1 parent 89ad904 commit 90239b1
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 89 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"highlight.js": "^9.12.0",
"is-empty-object": "^1.1.1",
"is-object": "^1.0.1",
"prettier-eslint-cli": "^4.7.1",
"prop-types": "^15.6.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
Expand Down Expand Up @@ -42,6 +41,7 @@
"eslint": "^4.18.2",
"eslint-plugin-react": "^7.6.1",
"flow-bin": "^0.74.0",
"prettier": "^1.11.1"
"prettier": "^1.11.1",
"prettier-eslint-cli": "^4.7.1"
}
}
105 changes: 87 additions & 18 deletions src/components/Completed/CompletedHeader/CompletedHeader.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,95 @@ export default class CompletedHeader extends PureComponent {

let subtitle = null;
let feedback = null;
let text = null;

const rating = getRating(score);

if (rating === ratings.EXPERT) {
subtitle = 'Perfect! You\'re ready to build mobile apps.';
feedback = 'With a score like that, you\'re a great candidate to pick up a tool like <a href="https://facebook.github.io/react-native/">React Native</a> and start building native applications.';
} else if (rating === ratings.PROFICIENT) {
subtitle = 'Good Job! You\'re proficient in Javascript.';
feedback = 'Although you didn\'t get a perfect score, you have a decent understanding of the language. With a bit of help, you\'d be well on your way to building out mobile applications with a tool like <a href="https://facebook.github.io/react-native/">React Native</a>.';
} else {
subtitle = 'You\'ve got a bit of learning to do before you\'re ready to build mobile apps';
feedback = 'Having a solid understanding of Javascript is essential to building mobile apps with a tool with a tool like <a href="https://facebook.github.io/react-native/">React Native</a>.';
switch (rating) {
case ratings.EXPERT: {
subtitle =
'Perfect! You’re ready to start building mobile apps.';
text = (
<div>
<p>
Based on your score, it looks like you’ve mastered
the Javascript fundamentals necessary to dive right
into learning to build native mobile applications.
</p>
<p>
Be sure to check your inbox in a few minutes because
I’m sending you some next steps you should take to
get started right.
</p>
<p>
For now, scroll down to review your results and
click below to book a free 15-minute coaching
session with me so I can provide personalized
recommendations to help you start learning to
develop mobile apps right away.
</p>
</div>
);
break;
}

case ratings.PROFICIENT: {
subtitle = 'Good Job! You’re proficient in Javascript.';
text = (
<div>
<p>
Based on your score, it looks like you have a decent
understanding of Javascript. With a bit of help,
you’ll be ready to learn to build native mobile
applications.
</p>
<p>
Be sure to check your inbox in a few minutes because
I’m sending you some next steps you can take to
advance your Javascript skills and get started
learning to build mobile apps.
</p>
<p>
For now, scroll down to review your results and
click below to book a free 15-minute coaching
session with me so I can provide personalized
recommendations to help you master Javascript
fundamentals and start learning to develop mobile
apps right away.
</p>
</div>
);
break;
}

default: {
subtitle =
'You’ve got a bit of learning to do before you’re ready to build mobile apps';
text = (
<div>
<p>
Based on your score, it looks like you’ll want to
focus on mastering Javascript fundamentals before
you start learning to build native mobile
applications
</p>
<p>
Be sure to check your inbox in a few minutes because
I’m sending you a few next steps you can take to
master the Javascript fundamentals necessary to
start learning to build mobile apps.
</p>
<p>
For now, scroll down to review your results and
click below to book a free 15-minute coaching
session with me so I can provide personalized
recommendations to help you fast-track the process
of mastering Javascript fundamentals.
</p>
</div>
);
break;
}
}

return (
Expand All @@ -39,15 +116,7 @@ export default class CompletedHeader extends PureComponent {
>{`Congratulations ${name}, you're finished!`}</h1>
<h2 className={'CompletedHeader__subtitle'}>{subtitle}</h2>
<p dangerouslySetInnerHTML={{ __html: feedback }} />
<p>
You can review your results below. If you want me to
review your assessment results and provide completely
personalized recommendations to make sure you get
started right, click below to book a{' '}
<strong>free 15-minute coaching session</strong>
{' '}
with me!
</p>
{text}
<a
href={'https://calendly.com/danwiltcoaching/15min'}
className={'CompletedHeader__schedule-call-button btn'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export default class CompletedResultsList extends PureComponent {
}}
>
<h2
className={'CompletedResultsList__question-title'}
className={
'CompletedResultsList__question-title'
}
>
<Question
question={`${i + 1}\\. ${question}`}
Expand All @@ -77,22 +79,30 @@ export default class CompletedResultsList extends PureComponent {
>
{codeFigure && (
<div
className={'CompletedResultsList__code-figure'}
className={
'CompletedResultsList__code-figure'
}
>
<CodeFigure
codeFigure={codeFigure}
/>
</div>
)}
<div
className={'CompletedResultsList__answers'}
className={
'CompletedResultsList__answers'
}
>
<div className={answersWrapperClasses}>
<div
className={'CompletedResultsList__correct-answer'}
className={
'CompletedResultsList__correct-answer'
}
>
<p
className={'CompletedResultsList__answer-title'}
className={
'CompletedResultsList__answer-title'
}
>
Correct Answer
</p>
Expand All @@ -104,10 +114,14 @@ export default class CompletedResultsList extends PureComponent {
/>
</div>
<div
className={'CompletedResultsList__your-answer'}
className={
'CompletedResultsList__your-answer'
}
>
<p
className={'CompletedResultsList__answer-title'}
className={
'CompletedResultsList__answer-title'
}
>
Your Answer
</p>
Expand All @@ -125,10 +139,14 @@ export default class CompletedResultsList extends PureComponent {
</div>
{!answeredCorrectly && (
<div
className={'CompletedResultsList__feedback'}
className={
'CompletedResultsList__feedback'
}
>
<h3
className={'CompletedResultsList__feedback-title'}
className={
'CompletedResultsList__feedback-title'
}
>
Feedback
</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
import {
EmailCaptureEmailInput,
EmailCaptureContinueButton,
SubscribeToMailingListCheckbox
SubscribeToMailingListCheckbox,
} from 'src/components';

import './EmailCapture.css';
Expand All @@ -23,7 +23,7 @@ export default class EmailCapture extends PureComponent {
</p>
<div className={'EmailCapture__form-wrapper'}>
<EmailCaptureEmailInput />
<div className="EmailCapture__mailing-list">
<div className={'EmailCapture__mailing-list'}>
<SubscribeToMailingListCheckbox />
</div>
<div className={'EmailCapture__continue-button'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default class SubscribeToMailingListCheckbox extends PureComponent {
<Checkbox
{...this.props}
id={'mailing-list-checkbox'}
label={'Yes, I would like to receive periodic updates from Dan Wilt Coaching.'}
label={
'Yes, I would like to receive periodic updates from Dan Wilt Coaching.'
}
/>
);
}
Expand Down
Loading

0 comments on commit 90239b1

Please sign in to comment.