-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.tsx
46 lines (38 loc) · 1.16 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React from 'react';
import { inject, observer } from 'mobx-react';
import { AccountStore } from "@stores";
import { Route, Router } from 'react-router-dom';
import DappUi from "@components/DappUi";
import NotificationStore from "@stores/NotificationStore";
import { Home } from "@components/Home";
import HistoryStore from "@stores/HistoryStore";
import SignDialog from '@components/SignDialog';
import { Notices } from '@components';
interface IProps {
accountStore?: AccountStore
notificationStore?: NotificationStore
historyStore?: HistoryStore
}
interface IState {
collapsedSidebar: boolean
}
@inject('accountStore', 'notificationStore', 'historyStore')
@observer
class App extends React.Component<IProps, IState> {
state = {
collapsedSidebar: true
};
render() {
return (
<div>
<Notices />
<Router history={this.props.historyStore!.history}>
<Route exact path="/" component={Home}/>
<Route path="/:string" component={DappUi}/>
<SignDialog/>
</Router>
</div>
);
}
}
export default App;