Skip to content

Commit 80c1223

Browse files
committed
Removed unrelated comment and added typescript for typechecking in StateRoute.tsx
1 parent 1a73a83 commit 80c1223

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/app/components/StateRoute.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
/* eslint-disable @typescript-eslint/no-var-requires */
66
/* eslint-disable max-len */
77
/* eslint-disable object-curly-newline */
8-
import React, { useState, useEffect } from 'react';
8+
import React from 'react';
99
import {
1010
MemoryRouter as Router,
1111
Route,
1212
NavLink,
1313
Switch,
14-
useLocation,
1514
} from 'react-router-dom';
1615
import { ParentSize } from '@visx/responsive';
1716
import Tree from './Tree';
@@ -24,7 +23,7 @@ import WebMetrics from './WebMetrics';
2423
const History = require('./History').default;
2524

2625
const NO_STATE_MSG = 'No state change detected. Trigger an event to change state';
27-
// eslint-disable-next-line react/prop-types
26+
2827

2928
export interface StateRouteProps {
3029
snapshot: {
@@ -79,7 +78,6 @@ const StateRoute = (props: StateRouteProps) => {
7978
sliderIndex={sliderIndex}
8079
viewIndex={viewIndex}
8180
currLocation={currLocation}
82-
// added snapshots 11/4 Rob
8381
snapshots={snapshots}
8482
/>
8583
)}
@@ -99,8 +97,8 @@ const StateRoute = (props: StateRouteProps) => {
9997
return <div className="noState">{NO_STATE_MSG}</div>;
10098
};
10199
const renderWebMetrics = () => {
102-
let LCPColor; let FIDColor; let FCPColor; let
103-
TTFBColor;
100+
let LCPColor: String; let FIDColor: String; let FCPColor: String; let
101+
TTFBColor: String;
104102

105103
if (webMetrics.LCP <= 2000) LCPColor = '#0bce6b';
106104
if (webMetrics.LCP > 2000 && webMetrics.LCP < 4000) LCPColor = '#E56543';

0 commit comments

Comments
 (0)