fix(learn): remove cta and add current challenge button (#38807)

This commit is contained in:
Twaha Rahman
2020-05-21 18:39:48 +06:00
committed by GitHub
parent bdbf5bfd8d
commit d01ce3bbc1
3 changed files with 35 additions and 12 deletions

View File

@@ -51,7 +51,8 @@ const propTypes = {
state: PropTypes.object,
user: PropTypes.shape({
name: PropTypes.string,
username: PropTypes.string
username: PropTypes.string,
completedChallengeCount: PropTypes.number
})
};
@@ -70,7 +71,7 @@ export const LearnPage = ({
isSignedIn,
navigate,
fetchState: { pending, complete },
user: { name = '', username = '' },
user: { name = '', username = '', completedChallengeCount = 0 },
data: {
challengeNode: {
fields: { slug }
@@ -86,6 +87,7 @@ export const LearnPage = ({
<Grid>
<Intro
complete={complete}
completedChallengeCount={completedChallengeCount}
isSignedIn={isSignedIn}
name={name}
navigate={navigate}