Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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