-
Notifications
You must be signed in to change notification settings - Fork 1
/
RootCmp.jsx
53 lines (47 loc) · 1.91 KB
/
RootCmp.jsx
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
47
48
49
50
51
52
import { HomePage } from './pages/HomePage.jsx';
import { MainHeader } from './cmps/MainHeader.jsx';
import { EmailApp } from './apps/MisterEmail/pages/EmailApp.jsx';
import { EmailDetails } from './apps/MisterEmail/pages/EmailDetails.jsx';
import { KeepApp } from './apps/MissKeep/pages/KeepApp.jsx';
import { BookApp } from './apps/MissBooks/pages/BookApp.jsx';
import { BookDetails } from './apps/MissBooks/cmps/BookDetails.jsx';
import { ReviewAdd } from './apps/MissBooks/cmps/ReviewAdd.jsx';
import { About } from './pages/About.jsx';
const Router = ReactRouterDOM.HashRouter;
const { Route, Switch } = ReactRouterDOM;
export function RootCmp() {
return (
<Router>
<section className="app">
<MainHeader />
<Switch>
<Route path="/email/inbox/:compose?" component={EmailApp} />
<Route path="/email/:emailId" component={EmailDetails} />
{/* <Route path="/email/:compose=true/:body?" component={EmailApp} /> */}
{/* <Route path="/keep/:keepId?" component={KeepDetails} /> */}
<Route path="/keep/:mail?" component={KeepApp} />
<Route path="/book/review/:bookId?" component={ReviewAdd} />
<Route path="/book/:bookId" component={BookDetails} />
<Route path="/book" component={BookApp} />
<Route path='/about' component={About} />
<Route path='/' component={HomePage} />
</Switch>
</section>
</Router>
)
}
// Using Class:
// export class App extends React.Component {
// render() {
// return (
// <div>
// <header>
// <h1>Lets Play</h1>
// </header>
// <main>
// <Home />
// </main>
// </div>
// )
// }
// }