Skip to content

Commit c6ae10b

Browse files
fix: routers && sidebar improvements
1 parent 997c8f4 commit c6ae10b

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/components/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
2+
import { HashRouter, Route, Switch, Redirect } from "react-router-dom";
33

44
// components
55
import Layout from "./Layout";
@@ -16,7 +16,7 @@ export default function App() {
1616
var { isAuthenticated } = useUserState();
1717

1818
return (
19-
<BrowserRouter>
19+
<HashRouter>
2020
<Switch>
2121
<Route exact path="/" render={() => <Redirect to="/app/dashboard" />} />
2222
<Route
@@ -28,7 +28,7 @@ export default function App() {
2828
<PublicRoute path="/login" component={Login} />
2929
<Route component={Error} />
3030
</Switch>
31-
</BrowserRouter>
31+
</HashRouter>
3232
);
3333

3434
// #######################################################################

src/components/Layout/Layout.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from "react";
22
import {
3-
BrowserRouter,
43
Route,
54
Switch,
65
Redirect,
@@ -35,7 +34,6 @@ function Layout(props) {
3534

3635
return (
3736
<div className={classes.root}>
38-
<BrowserRouter>
3937
<>
4038
<Header history={props.history} />
4139
<Sidebar />
@@ -61,7 +59,6 @@ function Layout(props) {
6159
</Switch>
6260
</div>
6361
</>
64-
</BrowserRouter>
6562
</div>
6663
);
6764
}

src/components/Sidebar/styles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export default makeStyles(theme => ({
4343
flexGrow: 1,
4444
padding: theme.spacing(3),
4545
},
46-
sidebarList: {
46+
/* sidebarList: {
4747
marginTop: theme.spacing(6),
48-
},
48+
}, */
4949
mobileBackButton: {
5050
marginTop: theme.spacing(0.5),
5151
marginLeft: theme.spacing(3),

0 commit comments

Comments
 (0)