diff --git a/package.json b/package.json
index b760eb5b..2e504e64 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react-json-view": "^1.21.3",
+ "react-router": "6",
"react-router-dom": "^5.2.0"
},
"devDependencies": {
diff --git a/src/App.jsx b/src/App.jsx
index 01314be5..2bf7a037 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -16,7 +16,7 @@ limitations under the License.
import React from "react";
import {
- HashRouter as Router,
+ BrowserRouter as Router,
Switch,
Route,
Redirect,
diff --git a/src/ErrorModal.jsx b/src/ErrorModal.jsx
index c0cb3100..c457fe07 100644
--- a/src/ErrorModal.jsx
+++ b/src/ErrorModal.jsx
@@ -1,10 +1,12 @@
import React, { useEffect } from "react";
import { Center, Content, Modal } from "./Layout";
-import { Link } from "react-router-dom";
+import { Link, useLocation } from "react-router-dom";
import { ErrorMessage } from "./Input";
import styles from "./ErrorModal.module.css";
export function ErrorModal({ error }) {
+ const location = useLocation();
+
useEffect(() => {
console.error(error);
}, [error]);
@@ -17,10 +19,14 @@ export function ErrorModal({ error }) {
{error.message}
- Login
+
+ Login
+
- Register
+
+ Register
+
diff --git a/yarn.lock b/yarn.lock
index 2da842e2..4f30bdda 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -176,6 +176,13 @@
dependencies:
regenerator-runtime "^0.13.4"
+"@babel/runtime@^7.7.6":
+ version "7.16.3"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5"
+ integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==
+ dependencies:
+ regenerator-runtime "^0.13.4"
+
"@babel/template@^7.15.4":
version "7.15.4"
resolved "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz"
@@ -1548,6 +1555,13 @@ history@^4.9.0:
tiny-warning "^1.0.0"
value-equal "^1.0.1"
+history@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/history/-/history-5.1.0.tgz#2e93c09c064194d38d52ed62afd0afc9d9b01ece"
+ integrity sha512-zPuQgPacm2vH2xdORvGGz1wQMuHSIB56yNAy5FnLuwOwgSYyPKptJtcMm6Ev+hRGeS+GzhbmRacHzvlESbFwDg==
+ dependencies:
+ "@babel/runtime" "^7.7.6"
+
hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
@@ -2666,6 +2680,13 @@ react-router@5.2.1:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"
+react-router@6:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.0.2.tgz#bd2b0fa84fd1d152671e9f654d9c0b1f5a7c86da"
+ integrity sha512-8/Wm3Ed8t7TuedXjAvV39+c8j0vwrI5qVsYqjFr5WkJjsJpEvNSoLRUbtqSEYzqaTUj1IV+sbPJxvO+accvU0Q==
+ dependencies:
+ history "^5.1.0"
+
react-textarea-autosize@^8.3.2:
version "8.3.3"
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.3.tgz#f70913945369da453fd554c168f6baacd1fa04d8"