Skip to content

Commit 6fff1af

Browse files
authored
Update index.js
1 parent 6f68d94 commit 6fff1af

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/pages/PageFour/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PageFour extends React.Component {
3333

3434
this.state = {
3535
// data that will be used/changed in render function
36-
spriteIndex: 0,
36+
stageIndex: 0,
3737
stepInfoIndex: 0,
3838
showKey: '',
3939
showPlayButton: true,
@@ -54,7 +54,7 @@ class PageFour extends React.Component {
5454
}
5555

5656
handleSubItemClick(key) {
57-
// this.state.spriteIndex = index;
57+
// this.state.stageIndex = index;
5858
if(this.state.showKey !== key) {
5959
this.setState({
6060
showKey: key,
@@ -78,7 +78,7 @@ class PageFour extends React.Component {
7878

7979
animation(index) {
8080
// 2 sets of sprites
81-
const previousStageIndex = this.state.spriteIndex;
81+
const previousStageIndex = this.state.stageIndex;
8282
const previousStage = allStages[previousStageIndex];
8383
const newStage = allStages[index];
8484
const times = 20;
@@ -163,7 +163,7 @@ class PageFour extends React.Component {
163163
const map = this.highlight(index)
164164

165165
this.setState({
166-
spriteIndex: index,
166+
stageIndex: index,
167167
stepInfoIndex: index,
168168
selectedSubGoals: map,
169169
playButtonColor: 'primary',
@@ -182,7 +182,7 @@ class PageFour extends React.Component {
182182
const map = this.highlight(index)
183183

184184
this.setState({
185-
spriteIndex: index,
185+
stageIndex: index,
186186
stepInfoIndex: index,
187187
selectedSubGoals: map,
188188
playButtonColor: 'primary',
@@ -201,7 +201,7 @@ class PageFour extends React.Component {
201201
this.animation(previousIndex)
202202
const map = this.highlight(previousIndex)
203203
this.setState({
204-
spriteIndex: previousIndex,
204+
stageIndex: previousIndex,
205205
stepInfoIndex: previousIndex,
206206
selectedSubGoals: map
207207
});
@@ -219,7 +219,7 @@ class PageFour extends React.Component {
219219
this.animation(nextIndex)
220220
const map = this.highlight(nextIndex)
221221
this.setState({
222-
spriteIndex: nextIndex,
222+
stageIndex: nextIndex,
223223
stepInfoIndex: nextIndex,
224224
selectedSubGoals: map
225225
});
@@ -235,7 +235,7 @@ class PageFour extends React.Component {
235235
} else {
236236
const map = this.highlight(nextIndex)
237237
this.setState({
238-
spriteIndex: nextIndex,
238+
stageIndex: nextIndex,
239239
stepInfoIndex: nextIndex,
240240
selectedSubGoals: map,
241241
playButtonColor: 'default',
@@ -253,7 +253,7 @@ class PageFour extends React.Component {
253253
const map = this.highlight(nextIndex)
254254
this.animation(nextIndex)
255255
this.setState({
256-
spriteIndex: nextIndex,
256+
stageIndex: nextIndex,
257257
stepInfoIndex: nextIndex,
258258
selectedSubGoals: map
259259
})
@@ -300,7 +300,7 @@ class PageFour extends React.Component {
300300
this.animation(0)
301301
const map = this.highlight(0)
302302
this.setState( {
303-
spriteIndex: 0,
303+
stageIndex: 0,
304304
stepInfoIndex: 0,
305305
selectedSubGoals: map,
306306
playButtonColor: 'primary',
@@ -317,7 +317,7 @@ class PageFour extends React.Component {
317317
this.animation(index)
318318
const map = this.highlight(index)
319319
this.setState( {
320-
spriteIndex: index,
320+
stageIndex: index,
321321
stepInfoIndex: index,
322322
selectedSubGoals: map,
323323
playButtonColor: 'primary',

0 commit comments

Comments
 (0)