Skip to content

Commit d25840c

Browse files
committed
Update for react-router v7
Signed-off-by: Michael Mior <mmior@mail.rit.edu>
1 parent 4496bcc commit d25840c

File tree

6 files changed

+9
-20
lines changed

6 files changed

+9
-20
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"react-joyride": "^2.9.3",
2525
"react-redux": "^9.2.0",
2626
"react-router": "^7.11.0",
27-
"react-router-dom": "^7.11.0",
2827
"react-scripts": "5.0.1",
2928
"react-simple-code-editor": "^0.14.1",
3029
"react-simple-tree-menu": "^1.1.18",

pnpm-lock.yaml

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.js

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 {Route, Routes} from 'react-router-dom';
2+
import {Route, Routes} from 'react-router';
33
import Home from './Home';
44

55
/** A container for all routes in the app (currently only one) */

src/EditorContainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
import React from 'react';
33
import {useDispatch, useSelector} from 'react-redux';
4-
import {useNavigate} from 'react-router-dom';
4+
import {useNavigate} from 'react-router';
55
import fromEntries from 'fromentries';
66
import SqlEditor from './SqlEditor';
77
import {exprFromSql} from './modules/relexp';

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
import './wydr';
33

4-
import {BrowserRouter} from 'react-router-dom';
4+
import {BrowserRouter} from 'react-router';
55
import {Provider} from 'react-redux';
66
import React from 'react';
77
import {createRoot} from 'react-dom/client';

src/setupTests.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import '@testing-library/jest-dom';
22

3+
import {TextEncoder, TextDecoder} from 'util';
4+
35
if (window.document) {
46
window.document.createRange = () => ({
57
setStart: () => {},
@@ -27,3 +29,7 @@ if (window.document) {
2729
jest.mock('uuid', () => ({
2830
v4: () => '00000000-0000-0000-0000-000000000000',
2931
}));
32+
33+
// Make available for react-router
34+
global.TextEncoder = TextEncoder;
35+
global.TextDecoder = TextDecoder;

0 commit comments

Comments
 (0)