Bläddra i källkod

Switch to BrowserRouter instead of MemoryRouter

Oleksandr Korniienko 3 år sedan
förälder
incheckning
e4c03f37f9
2 ändrade filer med 3 tillägg och 4 borttagningar
  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>
   );
 };