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';
66import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
77import { faQuestion } from '@fortawesome/free-solid-svg-icons' ;
88import { tutorialSaveSeriesToggle , setCurrentTabInApp } from '../actions/actions' ;
9+ import { element } from 'prop-types' ;
910
1011// This is the tutorial displayed when the "How to use" button is clicked
1112// This needs to be a class component to be compatible with updateStepElement from intro.js
@@ -21,7 +22,7 @@ class Tutorial extends Component {
2122 const { currentTabInApp, dispatch } = this . props ;
2223
2324 // This updates the steps so that they can target dynamically rendered elements
24- const onChangeHandler = currentStepIndex => {
25+ const onChangeHandler = ( currentStepIndex : Number ) => {
2526 if ( currentTabInApp === 'performance' && currentStepIndex === 1 ) {
2627 dispatch ( tutorialSaveSeriesToggle ( 'inputBoxOpen' ) ) ;
2728 this . steps . updateStepElement ( currentStepIndex ) ;
@@ -55,8 +56,17 @@ class Tutorial extends Component {
5556 }
5657 this . setState ( { stepsEnabled : true } ) ;
5758 } ;
58- let steps = [ ] ;
5959
60+ interface stepsObj {
61+ title : String ,
62+ element ?: String ,
63+ intro : String ,
64+ position : String ,
65+ }
66+
67+ let steps : stepsObj [ ] = [ ] ;
68+
69+
6070 switch ( currentTabInApp ) {
6171 case 'map' :
6272 steps = [ {
@@ -200,6 +210,9 @@ class Tutorial extends Component {
200210 break ;
201211 }
202212
213+
214+
215+
203216 return (
204217 < >
205218 < Steps
You can’t perform that action at this time.
0 commit comments