Skip to content

Fix/update to api #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 15, 2019
Prev Previous commit
Next Next commit
fix initial position
  • Loading branch information
ShMcK committed Oct 15, 2019
commit f4d0e568ffe40271aed140712e0d93d957264631
2 changes: 2 additions & 0 deletions web-app/src/services/apollo/queries/tutorial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default gql`
}
}
levels {
id
title
description
setup {
Expand All @@ -33,6 +34,7 @@ export default gql`
files
}
steps {
id
title
description
setup {
Expand Down
5 changes: 3 additions & 2 deletions web-app/src/services/selectors/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ export const defaultPosition = () => ({
export const initialPosition = createSelector(
tutorial.currentVersion,
(version: G.TutorialVersion) => {
const level = version.data.levels[0]
const position: CR.Position = {
levelId: version.data.levels[0].id,
stepId: version.data.levels[0].steps[0].id,
levelId: level.id,
stepId: level.steps[0].id,
}
return position
}
Expand Down