Skip to content

Commit 52f9d4a

Browse files
committed
fixed most typescript errors on all component files in app
2 parents 16a777d + ed35d21 commit 52f9d4a

17 files changed

+69
-76
lines changed

src/app/components/AtomsRelationshipLegend.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ import {
77

88
} from '@visx/legend';
99

10-
// declare namespace React {
11-
// type ReactNode = JSX.Element;
12-
// }
13-
14-
1510
const ordinalColorScale = scaleOrdinal({
1611
domain: ['Root', 'Selectors', 'Atoms', 'Components'],
1712
range: [ '#3BB78F', '#f0ece2', '#FED8B1', '#acdbdf'],

src/app/components/ComponentMap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
// @ts-nocheck
22
import React, { useState } from 'react';
33
import { Group } from '@visx/group';
44
import { hierarchy, Tree } from '@visx/hierarchy';
@@ -149,7 +149,7 @@ export default function ComponentMap({
149149
fill="url('#links-gradient')"
150150
onClick={() => {
151151
node.data.isExpanded = !node.data.isExpanded;
152-
console.log(node);
152+
// console.log(node);
153153
forceUpdate();
154154
}}
155155
/>

src/app/components/Diff.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/* eslint-disable @typescript-eslint/ban-types */
44
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
55
/* eslint-disable react/require-default-props */
6-
// @ts-nocheck
76
import React from 'react';
87
import { diff, formatters } from 'jsondiffpatch';
98
import ReactHtmlParser from 'react-html-parser';

src/app/components/DiffRoute.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
import React from 'react';
32
import {
43
MemoryRouter as Router, Route, NavLink, Switch,

src/app/components/Dropdown.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
import React from 'react';
32
import Select from 'react-select';
43

src/app/components/ErrorHandler.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21

32
/* eslint-disable react/prop-types */
43
/* eslint-disable semi */

src/app/components/History.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// @ts-nocheck
21

32
import React, { Component, useEffect, useState } from 'react';
43
import * as d3 from 'd3';
54
import LegendKey from './legend';
6-
import { changeView, changeSlider } from '../actions/actions';
7-
5+
// import { changeView, changeSlider } from '../actions/actions';
86
/**
97
* @var colors: Colors array for the diffrerent node branches, each color is for a different branch
108
*/
@@ -79,6 +77,7 @@ function History(props: Record<string, unknown>) {
7977

8078
// d3.hierarchy constructs a root node from the specified hierarchical data
8179
// (our object titled dataset), which must be an object representing the root node
80+
8281
const hierarchy = d3.hierarchy(root);
8382
const tree = d3
8483
.tree()
@@ -152,12 +151,12 @@ function History(props: Record<string, unknown>) {
152151
d3.select(this).transition(90).duration(18).attr('r', 21);
153152
})
154153
.on('click', function (d: `Record<string, unknown>`) {
155-
const index = parseInt(`${d.data.name}.${d.data.branch}`);
156-
dispatch(changeSlider(index));
157-
dispatch(changeView(index));
154+
// const index = parseInt(`${d.data.name}.${d.data.branch}`);
155+
// dispatch(changeSlider(index));
156+
// dispatch(changeView(index));
158157
})
159158
// think about how I can convert this any to typescript
160-
.on('mouseout', function (d: any) {
159+
.on('mouseout', function () {
161160
d3.select(this).transition().duration(300).attr('r', 14);
162161
});
163162

src/app/components/LinkControls.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21

32
import React from 'react';
43
// Font size of the Controls label and Dropdowns

src/app/components/MainSlider.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
33
/* eslint-disable react/jsx-props-no-spreading */
44
/* eslint-disable react/prop-types */
5-
// @ts-nocheck
6-
75
import React from 'react';
86
import Slider from 'rc-slider';
97
import Tooltip from 'rc-tooltip';

src/app/components/PerfView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const PerfView = (props: PerfViewProps) => {
3939
const adjustedSize = Math.min(width, height);
4040
const svgRef = useRef(null);
4141

42-
console.log(snapshots)
42+
// console.log(snapshots)
4343

4444
// const performances = []
4545
// snapshot = {

0 commit comments

Comments
 (0)