Skip to content

Commit 80c6b81

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Removed public props from tutorial class. Changed import steps from intro.js module to require
Changing import steps to require from intro.js module allows TS compatibility because it change the type of Steps to any which is what was the problem before. Left comments inside to aid next iterator to fix this error if possible
1 parent 9f8e1e0 commit 80c6b81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/components/Tutorial.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/* eslint-disable react/sort-comp */
22
/* eslint-disable lines-between-class-members */
33
/* eslint-disable react/static-property-placement */
4-
//@ts-nocheck
4+
55
import * as React from 'react';
66
import { Component } from 'react';
7-
import { Steps } from 'intro.js-react';
87
import 'intro.js/introjs.css';
98
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
109
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
1110
import { tutorialSaveSeriesToggle, setCurrentTabInApp } from '../actions/actions';
1211

12+
const { Steps } = require('intro.js-react');
13+
1314
interface tutorialProps {
1415
dispatch: (object) => void;
1516
currentTabInApp: string;
@@ -22,14 +23,13 @@ interface tutorialState {
2223
// This is the tutorial displayed when the "How to use" button is clicked
2324
// This needs to be a class component to be compatible with updateStepElement from intro.js
2425
export default class Tutorial extends React.Component<tutorialProps, tutorialState> {
25-
constructor(props:tutorialProps) {
26+
constructor(props: tutorialProps) {
2627
super(props);
2728
this.state = {
2829
stepsEnabled: false,
2930
};
3031
}
3132

32-
public props: tutorialProps;
3333
render(): JSX.Element {
3434
const { currentTabInApp, dispatch } = this.props;
3535

0 commit comments

Comments
 (0)