File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'intro.js/introjs.css';
6
6
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
7
7
import { faQuestion } from '@fortawesome/free-solid-svg-icons' ;
8
8
import { tutorialSaveSeriesToggle , setCurrentTabInApp } from '../actions/actions' ;
9
+ import { element } from 'prop-types' ;
9
10
10
11
// This is the tutorial displayed when the "How to use" button is clicked
11
12
// This needs to be a class component to be compatible with updateStepElement from intro.js
@@ -21,7 +22,7 @@ class Tutorial extends Component {
21
22
const { currentTabInApp, dispatch } = this . props ;
22
23
23
24
// This updates the steps so that they can target dynamically rendered elements
24
- const onChangeHandler = currentStepIndex => {
25
+ const onChangeHandler = ( currentStepIndex : Number ) => {
25
26
if ( currentTabInApp === 'performance' && currentStepIndex === 1 ) {
26
27
dispatch ( tutorialSaveSeriesToggle ( 'inputBoxOpen' ) ) ;
27
28
this . steps . updateStepElement ( currentStepIndex ) ;
@@ -55,8 +56,17 @@ class Tutorial extends Component {
55
56
}
56
57
this . setState ( { stepsEnabled : true } ) ;
57
58
} ;
58
- let steps = [ ] ;
59
59
60
+ interface stepsObj {
61
+ title : String ,
62
+ element ?: String ,
63
+ intro : String ,
64
+ position : String ,
65
+ }
66
+
67
+ let steps : stepsObj [ ] = [ ] ;
68
+
69
+
60
70
switch ( currentTabInApp ) {
61
71
case 'map' :
62
72
steps = [ {
@@ -200,6 +210,9 @@ class Tutorial extends Component {
200
210
break ;
201
211
}
202
212
213
+
214
+
215
+
203
216
return (
204
217
< >
205
218
< Steps
You can’t perform that action at this time.
0 commit comments