Skip to content

Commit dabca5f

Browse files
committed
working on formaters
1 parent 40b4c58 commit dabca5f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/app/components/StateRoute/History.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
// @ts-nocheck
44
import React, { useEffect } from 'react';
55
// formatting findDiff return data to show the changes with colors, aligns with actions.tsx
6-
import { diff, formatters } from 'jsondiffpatch';
6+
import { diff } from 'jsondiffpatch';
7+
import { HtmlFormatter } from 'jsondiffpatch/lib/formatters';
8+
// import * as jsondiffpatch from 'jsondiffpatch';
9+
// import { diff } from 'jsondiffpatch';
10+
// import formatters from 'jsondiffpatch/src/formatters';
711
import * as d3 from 'd3';
812
import { DefaultMargin } from '../../FrontendTypes';
913
import { useDispatch } from 'react-redux';
@@ -156,7 +160,7 @@ function History(props: Record<string, unknown>): JSX.Element {
156160
);
157161

158162
const changedState = findStateChangeObj(delta); // determines if delta had any stateful changes
159-
const html = formatters.html.format(changedState[0]); // formats the difference into html string
163+
const html = HtmlFormatter.format(changedState[0]); // formats the difference into html string
160164
return html; // return html string
161165
}
162166

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
235235
// Cursor position in window updates position of the tool tip.
236236
dispatch(onHover(data.componentData[bar.key].rtid));
237237
if (tooltipTimeout) clearTimeout(tooltipTimeout);
238-
const top;
238+
let top;
239239
if (snapshot === 'All Snapshots') {
240240
top = event.clientY - margin.top - bar.height;
241241
} else {

0 commit comments

Comments
 (0)