Skip to content

Commit 7a522e8

Browse files
committed
redid formatters
1 parent dabca5f commit 7a522e8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/app/components/StateRoute/ComponentMap/ToolTipDataDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import JSONTree from 'react-json-tree';
2+
import { JSONTree } from 'react-json-tree';
33

44
/*
55
Code that show's the tooltip of our JSON tree

src/app/components/StateRoute/History.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import React, { useEffect } from 'react';
55
// formatting findDiff return data to show the changes with colors, aligns with actions.tsx
66
import { diff } from 'jsondiffpatch';
7-
import { HtmlFormatter } from 'jsondiffpatch/lib/formatters';
7+
const jsondiffpatch = require('jsondiffpatch');
88
// import * as jsondiffpatch from 'jsondiffpatch';
99
// import { diff } from 'jsondiffpatch';
1010
// import formatters from 'jsondiffpatch/src/formatters';
@@ -160,7 +160,7 @@ function History(props: Record<string, unknown>): JSX.Element {
160160
);
161161

162162
const changedState = findStateChangeObj(delta); // determines if delta had any stateful changes
163-
const html = HtmlFormatter.format(changedState[0]); // formats the difference into html string
163+
const html = jsondiffpatch.formatters.format(changedState[0]); // formats the difference into html string
164164
return html; // return html string
165165
}
166166

src/app/components/StateRoute/Tree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect } from 'react';
2-
import JSONTree from 'react-json-tree'; // React JSON Viewer Component
2+
import { JSONTree } from 'react-json-tree'; // React JSON Viewer Component
33
import { setCurrentTabInApp } from '../../slices/mainSlice';
44
import { useDispatch } from 'react-redux';
55
import { TreeProps } from '../../FrontendTypes';

0 commit comments

Comments
 (0)