Skip to content

Commit ecdfad2

Browse files
committed
Mostly working just have to fix react router and next.js
1 parent dabca5f commit ecdfad2

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/app/components/App.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 { MemoryRouter as Router } from 'react-router-dom';
2+
import { Router } from 'react-router-dom';
33
import MainContainer from '../containers/MainContainer';
44
import { ThemeProvider } from '@mui/material/styles';
55
import theme from './theme';

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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
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 } from 'jsondiffpatch';
7-
import { HtmlFormatter } from 'jsondiffpatch/lib/formatters';
8-
// import * as jsondiffpatch from 'jsondiffpatch';
96
// import { diff } from 'jsondiffpatch';
10-
// import formatters from 'jsondiffpatch/src/formatters';
7+
// import { HtmlFormatter } from 'jsondiffpatch/lib/formatters';
8+
// import * as jsondiffpatch from 'jsondiffpatch';
9+
import { diff } from 'jsondiffpatch';
10+
// import jsondiffpatch from 'jsondiffpatch/formatters';
11+
const jsondiffpatch = require('jsondiffpatch');
1112
import * as d3 from 'd3';
1213
import { DefaultMargin } from '../../FrontendTypes';
1314
import { useDispatch } from 'react-redux';
@@ -158,9 +159,8 @@ function History(props: Record<string, unknown>): JSX.Element {
158159
statelessCleaning(snapshots[index - 1]),
159160
statelessCleaning(snapshots[index]),
160161
);
161-
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)