Skip to content

Fix/state machine #97

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 8 commits into from
Feb 1, 2020
Merged
Prev Previous commit
Next Next commit
rename select tutorial actions
  • Loading branch information
ShMcK committed Jan 31, 2020
commit d91b25978308e851bf75149a7b2c6c8b23b64663
2 changes: 1 addition & 1 deletion web-app/src/containers/New/TutorialList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface Props {
const TutorialList = (props: Props) => {
const onSelect = (tutorial: G.Tutorial) => {
props.send({
type: 'TUTORIAL_START',
type: 'SELECT_TUTORIAL',
payload: {
tutorial,
},
Expand Down
2 changes: 1 addition & 1 deletion web-app/src/containers/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Overview = (props: PageProps) => {

const onNext = () =>
props.send({
type: 'LOAD_TUTORIAL',
type: 'TUTORIAL_START',
payload: {
tutorial: data.tutorial,
},
Expand Down
6 changes: 3 additions & 3 deletions web-app/src/services/state/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const createMachine = (options: any) => {
onEntry: ['clearStorage'],
id: 'start-new-tutorial',
on: {
TUTORIAL_START: {
SELECT_TUTORIAL: {
target: 'LoadTutorial',
actions: ['newTutorial'],
},
Expand All @@ -101,7 +101,7 @@ export const createMachine = (options: any) => {
Summary: {
on: {
BACK: 'SelectTutorial',
LOAD_TUTORIAL: {
TUTORIAL_START: {
target: '#tutorial',
actions: ['initPosition', 'initTutorial'],
},
Expand All @@ -110,7 +110,7 @@ export const createMachine = (options: any) => {
ContinueTutorial: {
on: {
TUTORIAL_START: {
target: '#tutorial-level',
target: '#tutorial',
actions: ['continueConfig'],
},
TUTORIAL_SELECT: 'SelectTutorial',
Expand Down