Skip to content

Commit d1c1a57

Browse files
committed
Added typescript for storedSeries
1 parent 74d11ce commit d1c1a57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/components/StateRoute/PerformanceVisx/BarGraphComparison.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
/// <reference lib="dom" />
22
/* eslint-disable no-param-reassign */
33
import React, { useEffect } from 'react';
44
import { BarStack } from '@visx/shape';
@@ -20,7 +20,7 @@ import { useStoreContext } from '../../../store';
2020
import {
2121
snapshot, TooltipData, Margin, BarGraphComparisonProps, ActionObj, Series,
2222
} from '../../FrontendTypes';
23-
import { BarStack } from '@visx/shape/lib/types';
23+
// import { BarStack as BarStacks } from '@visx/shape/lib/types';
2424

2525
/* DEFAULTS */
2626
const margin: Margin = {
@@ -70,7 +70,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
7070
const getSnapshotId = (d: snapshot) => d.snapshotId;
7171
const formatSnapshotId = (id: string): string => `Snapshot ID: ${id}`;
7272
const formatRenderTime = (time: string): string => `${time} ms `;
73-
const getCurrentTab = (storedSeries: Record<string, unknown>) => storedSeries.currentTab;
73+
const getCurrentTab = (storedSeries: ActionObj) => storedSeries.currentTab;
7474

7575
// create visualization SCALES with cleaned data
7676
// the domain array/xAxisPoints elements will place the bars along the x-axis
@@ -187,7 +187,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
187187

188188
const animateButton = (e: MouseEvent) => {
189189
e.preventDefault();
190-
const target = event.target as HTMLButtonElement;
190+
const target = (e.target as HTMLButtonElement);
191191
if (target) {
192192
target.classList.add('animate');
193193
target.innerHTML = 'Deleted!';

0 commit comments

Comments
 (0)