File tree Expand file tree Collapse file tree 2 files changed +11
-18
lines changed
Expand file tree Collapse file tree 2 files changed +11
-18
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { BrowserRouter as Router } from 'react-router-dom' ;
3- import { observer } from 'mobx-react' ;
2+ import { BrowserRouter } from 'react-router-dom' ;
43
54import Main from './screens/Main' ;
65import 'antd/dist/antd.less' ;
76import './App.global.less' ;
87
9- export default observer ( ( ) => {
8+ const App = ( ) => {
109 // useEffect(() => {
1110 // Sentry.captureException(new Error(`${process.env.NODE_ENV} exception`));
1211 // }, []);
1312
1413 return (
15- < Router >
14+ < BrowserRouter >
1615 < Main />
17- </ Router >
16+ </ BrowserRouter >
1817 ) ;
19- } ) ;
18+ } ;
19+
20+ export default App ;
Original file line number Diff line number Diff line change @@ -28,18 +28,10 @@ export default observer(function Main() {
2828 < TaskControl />
2929 </ Header >
3030 < Switch >
31- < Route exact path = "/" >
32- < Redirect to = "/projects" />
33- </ Route >
34- < Route path = "/hours" >
35- < HoursScreen />
36- </ Route >
37- < Route path = "/projects" >
38- < ProjectsScreen />
39- </ Route >
40- < Route path = "/dashboard" >
41- < Dashboard />
42- </ Route >
31+ < Redirect exact from = "/" to = "/projects" />
32+ < Route path = "/hours" component = { HoursScreen } />
33+ < Route path = "/projects" component = { ProjectsScreen } />
34+ < Route path = "/dashboard" component = { Dashboard } />
4335 </ Switch >
4436 </ Layout >
4537 ) ;
You can’t perform that action at this time.
0 commit comments