Browse Source

Switch to BrowserRouter instead of MemoryRouter

Oleksandr Korniienko 3 năm trước cách đây
mục cha
commit
e4c03f37f9
2 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 0 0
      src/components/Mint/config.ts
  2. 3 4
      src/components/Routes/index.tsx

+ 0 - 0
src/components/Mint/config.ts


+ 3 - 4
src/components/Routes/index.tsx

@@ -1,6 +1,5 @@
 import React from "react";
-import { MemoryRouter } from "react-router";
-import { Switch, Route } from "react-router-dom";
+import { BrowserRouter, Switch, Route } from "react-router-dom";
 import {
   AppBar,
   Calendar,
@@ -36,7 +35,7 @@ const Routes = (props: IProps) => {
 
   return (
     <div>
-      <MemoryRouter>
+      <BrowserRouter>
         <div style={{ flexGrow: 1 }}>
           <AppBar />
         </div>
@@ -125,7 +124,7 @@ const Routes = (props: IProps) => {
             <Route path="/" render={() => <Dashboard {...props} />} />
           </Switch>
         </div>
-      </MemoryRouter>
+      </BrowserRouter>
     </div>
   );
 };