From af529267e7ba2da38d25a334224d2b845a38d353 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 21:45:20 +0000 Subject: [PATCH] Bump react-router-dom from 5.3.0 to 6.0.2 in /taker-frontend This patch also fixes a bug where we redirect to `/trade` instead of `/` which now renders an empty page with the new router. --- taker-frontend/package.json | 3 +- taker-frontend/src/App.tsx | 19 ++-- taker-frontend/src/components/Logo.tsx | 6 +- taker-frontend/src/components/NavBar.tsx | 10 +- taker-frontend/yarn.lock | 125 +++++------------------ 5 files changed, 46 insertions(+), 117 deletions(-) diff --git a/taker-frontend/package.json b/taker-frontend/package.json index 3bef11d..835558a 100644 --- a/taker-frontend/package.json +++ b/taker-frontend/package.json @@ -20,7 +20,6 @@ "@types/node": "^16.11.9", "@types/react": "^17.0.36", "@types/react-dom": "^17.0.11", - "@types/react-router-dom": "5.3.2", "@vitejs/plugin-react": "^1.0.9", "framer-motion": "^4", "next": "^12.0.4", @@ -29,7 +28,7 @@ "react-dom": "^17.0.2", "react-icons": "^4.3.1", "react-refresh": "^0.11.0", - "react-router-dom": "5.3.0", + "react-router-dom": "6.0.2", "react-scripts": "4.0.3", "react-sse-hooks": "^1.0.5", "react-use-websocket": "^2.9.1", diff --git a/taker-frontend/src/App.tsx b/taker-frontend/src/App.tsx index 8c24547..7857393 100644 --- a/taker-frontend/src/App.tsx +++ b/taker-frontend/src/App.tsx @@ -12,7 +12,7 @@ import { import * as React from "react"; import { useEffect, useState } from "react"; import { useAsync } from "react-async"; -import { Route, Switch } from "react-router-dom"; +import { Route, Routes } from "react-router-dom"; import { useEventSource } from "react-sse-hooks"; import useWebSocket from "react-use-websocket"; import { useBackendMonitor } from "./components/BackendMonitor"; @@ -134,12 +134,11 @@ export const App = () => { <>