Skip to content

Commit fe340de

Browse files
committed
Merge branch 'dev' into brian/feature
2 parents 25adb99 + d12472f commit fe340de

File tree

12 files changed

+311
-303
lines changed

12 files changed

+311
-303
lines changed

src/app/__tests__/RouteDescription.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
/* eslint-disable @typescript-eslint/no-explicit-any */
32
/* eslint-disable react/jsx-filename-extension */
43

@@ -11,7 +10,7 @@ import RouteDescription from '../components/RouteDescription';
1110
configure({ adapter: new (Adapter as any)() });
1211

1312
describe('Unit testing RouteDescription', () => {
14-
const actionsArr = [];
13+
const actionsArr: JSX.Element[] = [];
1514

1615
actionsArr.push(
1716
<Action

src/app/components/Action.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ interface ActionProps {
2020
displayName: string;
2121
componentName: string;
2222
componentData: { actualDuration: number } | undefined;
23+
routePath: any;
2324
state?: Record<string, unknown>;
24-
viewIndex: number;
25+
viewIndex: number | undefined;
2526
isCurrIndex: boolean;
2627
handleOnkeyDown: (e: any, i: number) => any;
2728
}

src/app/components/Loader.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/* eslint-disable react/prop-types */
22

3-
// @ts-nocheck
4-
53
import React from 'react';
64
import { css } from '@emotion/react';
75
import { ClipLoader } from 'react-spinners';

src/app/components/Tutorial.tsx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
1-
// @ts-nocheck
1+
/* eslint-disable react/sort-comp */
2+
/* eslint-disable lines-between-class-members */
3+
/* eslint-disable react/static-property-placement */
4+
//@ts-nocheck
25
import * as React from 'react';
36
import { Component } from 'react';
47
import { Steps } from 'intro.js-react';
58
import 'intro.js/introjs.css';
69
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
710
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
811
import { tutorialSaveSeriesToggle, setCurrentTabInApp } from '../actions/actions';
9-
import { element } from 'prop-types';
12+
13+
interface tutorialProps {
14+
dispatch: unknown;
15+
currentTabInApp: unknown;
16+
}
1017

1118
// This is the tutorial displayed when the "How to use" button is clicked
1219
// This needs to be a class component to be compatible with updateStepElement from intro.js
13-
class Tutorial extends Component {
14-
constructor(props) {
20+
export default class Tutorial extends React.Component<tutorialProps> {
21+
constructor(props:tutorialProps) {
1522
super(props);
1623
this.state = {
1724
stepsEnabled: false,
1825
};
1926
}
2027

21-
render() {
28+
public props: tutorialProps;
29+
render(): JSX.Element {
2230
const { currentTabInApp, dispatch } = this.props;
23-
31+
2432
// This updates the steps so that they can target dynamically rendered elements
25-
const onChangeHandler = (currentStepIndex: Number) => {
33+
const onChangeHandler = (currentStepIndex: number) => {
2634
if (currentTabInApp === 'performance' && currentStepIndex === 1) {
2735
dispatch(tutorialSaveSeriesToggle('inputBoxOpen'));
2836
this.steps.updateStepElement(currentStepIndex);
@@ -58,15 +66,14 @@ class Tutorial extends Component {
5866
};
5967

6068
interface stepsObj {
61-
title: String,
62-
element?: String,
63-
intro: String,
64-
position: String,
69+
title: string,
70+
element?: string,
71+
intro: string,
72+
position: string,
6573
}
6674

6775
let steps: stepsObj[] = [];
6876

69-
7077
switch (currentTabInApp) {
7178
case 'map':
7279
steps = [{
@@ -210,9 +217,6 @@ class Tutorial extends Component {
210217
break;
211218
}
212219

213-
214-
215-
216220
return (
217221
<>
218222
<Steps
@@ -250,5 +254,3 @@ class Tutorial extends Component {
250254
);
251255
}
252256
}
253-
254-
export default Tutorial;

src/app/containers/ActionContainer.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @ts-nocheck
1+
/* eslint-disable max-len */
22
import React, { useEffect, useState } from 'react';
33

44
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -34,7 +34,10 @@ function ActionContainer(props): JSX.Element {
3434

3535
// function to traverse state from hierarchy and also getting information on display name and component name
3636
const displayArray = (obj: {
37-
stateSnapshot: { children: any[] };
37+
stateSnapshot: {
38+
route: any,
39+
children: any[]
40+
};
3841
name: number;
3942
branch: number;
4043
index: number;
@@ -97,6 +100,7 @@ function ActionContainer(props): JSX.Element {
97100
actionsArr = hierarchyArr.map(
98101
(
99102
snapshot: {
103+
routePath: any;
100104
state?: Record<string, unknown>;
101105
index: number;
102106
displayName: string;

src/app/containers/ButtonsContainer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ function exportHandler(snapshots: []) {
3131
URL.revokeObjectURL(fileDownload.href);
3232
}
3333

34-
function importHandler(dispatch: (a: any) => void) {
34+
function importHandler(dispatch: (a: unknown) => void) {
3535
const fileUpload = document.createElement('input');
3636
fileUpload.setAttribute('type', 'file');
3737

38-
fileUpload.onchange = () => {
38+
fileUpload.onchange = (e) => {
3939
const reader = new FileReader();
4040
reader.onload = () => {
4141
const test = reader.result.toString();
4242
return dispatch(importSnapshots(JSON.parse(test)));
4343
};
44-
if (event.target.hasOwnProperty('files')) {
45-
const eventFiles: any = event.target;
44+
if (e.target.hasOwnProperty('files')) {
45+
const eventFiles: unknown = e.target;
4646
reader.readAsText(eventFiles.files[0]);
4747
}
4848
};

src/app/containers/MainContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function MainContainer(): JSX.Element {
5858
let maxTab: number;
5959
if (!sourceTab) {
6060
const tabsArray: Array<string> = Object.keys(payload);
61-
maxTab = Math.max(...tabsArray);
61+
const numTabsArray: number[] = tabsArray.map(tab => Number(tab));
62+
maxTab = Math.max(...numTabsArray);
6263
}
6364
switch (action) {
6465
case 'deleteTab': {

src/app/containers/TravelContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @ts-nocheck
1+
/* eslint-disable max-len */
22
import React, { useState } from 'react';
33
import MainSlider from '../components/MainSlider';
44
import Dropdown from '../components/Dropdown';

src/backend/__tests__/linkFiber.test.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@ let snapShot;
2424

2525
let browser;
2626
let page;
27-
interface Component {
28-
render(): any;
29-
context: any;
30-
setState: any;
31-
forceUpdate: any;
32-
props: any;
33-
state: any;
34-
refs: any;
35-
}
36-
27+
// interface Component {
28+
// render(): any;
29+
// context: any;
30+
// setState: any;
31+
// forceUpdate: any;
32+
// props: any;
33+
// state: any;
34+
// refs: any;
35+
// }
3736

3837
class App extends Component{
3938
state: { foo: string; };
@@ -106,4 +105,4 @@ xdescribe('unit test for linkFiber', () => {
106105
});
107106
});
108107

109-
SERVER.close();
108+
SERVER.close();

src/backend/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,27 @@
1313
* Reactime contributors:
1414
"Abaas Khorrami",
1515
"Andy Wong",
16+
"Brian Yang",
1617
"Bryan Lee",
1718
"Carlos Perez",
1819
"Chris Flannery",
1920
"David Chai",
2021
"Edwin Menendez",
22+
"Emin Tahirov",
2123
"Ergi Shehu",
2224
"Gabriela Jardim Aquino",
2325
"Gregory Panciera",
2426
"Josh Kim",
2527
"Joshua Howard",
28+
"Louis Lam",
2629
"Nathanael Wa Mwenze",
2730
"Prasanna Malla",
2831
"Rajeeb Banstola",
2932
"Raymond Kwan",
3033
"Rocky Lin",
3134
"Ruth Anam",
3235
"Ryan Dang",
36+
"Samuel Tran",
3337
"Sierra Swaby",
3438
"Yujin Kang"
3539
*

0 commit comments

Comments
 (0)