From 82c2e753862c5ca5da0ee594e021410186b65771 Mon Sep 17 00:00:00 2001 From: yifanwww Date: Sat, 19 Aug 2023 17:15:54 +0800 Subject: [PATCH] refactor: import router stuff from react-router-dom directly --- packages/app-renderer/package.json | 1 - packages/app-renderer/src/MainWindow/index.tsx | 3 +-- pnpm-lock.yaml | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/app-renderer/package.json b/packages/app-renderer/package.json index 4072065a..b9a85002 100644 --- a/packages/app-renderer/package.json +++ b/packages/app-renderer/package.json @@ -38,7 +38,6 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-redux": "^8.1.0", - "react-router": "^6.13.0", "react-router-dom": "^6.13.0", "web-vitals": "^3.3.2" }, diff --git a/packages/app-renderer/src/MainWindow/index.tsx b/packages/app-renderer/src/MainWindow/index.tsx index 595326cb..ae812df5 100644 --- a/packages/app-renderer/src/MainWindow/index.tsx +++ b/packages/app-renderer/src/MainWindow/index.tsx @@ -1,7 +1,6 @@ import { Suspense } from 'react'; import { Provider as ReduxProvider } from 'react-redux'; -import { Navigate, Route, Routes } from 'react-router'; -import { HashRouter } from 'react-router-dom'; +import { HashRouter, Navigate, Route, Routes } from 'react-router-dom'; import { FramelessWindow, TitleBar } from 'src/utils/frameless'; import type { ReactChildrenProps } from 'src/utils/react'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07d993b7..b853febb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -150,9 +150,6 @@ importers: react-redux: specifier: ^8.1.0 version: 8.1.0(@reduxjs/toolkit@1.9.5)(@types/react-dom@18.2.7)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) - react-router: - specifier: ^6.13.0 - version: 6.13.0(react@18.2.0) react-router-dom: specifier: ^6.13.0 version: 6.13.0(react-dom@18.2.0)(react@18.2.0)