Skip to content

Commit dbc08a5

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Added tutorial props with typing and tutorial state with typing for React.component in tutorial.tsx
1 parent 21570bb commit dbc08a5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/app/components/Tutorial.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ import { faQuestion } from '@fortawesome/free-solid-svg-icons';
1111
import { tutorialSaveSeriesToggle, setCurrentTabInApp } from '../actions/actions';
1212

1313
interface tutorialProps {
14-
dispatch: unknown;
15-
currentTabInApp: unknown;
14+
dispatch: (object) => void;
15+
currentTabInApp: string;
16+
}
17+
18+
interface tutorialState {
19+
stepsEnabled: boolean;
1620
}
1721

1822
// This is the tutorial displayed when the "How to use" button is clicked
1923
// This needs to be a class component to be compatible with updateStepElement from intro.js
20-
export default class Tutorial extends React.Component<tutorialProps> {
24+
export default class Tutorial extends React.Component<tutorialProps, tutorialState> {
2125
constructor(props:tutorialProps) {
2226
super(props);
2327
this.state = {

0 commit comments

Comments
 (0)