-
Notifications
You must be signed in to change notification settings - Fork 0
/
root-cmp.jsx
41 lines (27 loc) · 1.22 KB
/
root-cmp.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
const { Route, Routes } = ReactRouterDOM
const Router = ReactRouterDOM.HashRouter
import { AppHeader } from "./cmps/app-header.jsx"
import { About } from "./views/about.jsx"
import { Home } from "./views/home.jsx"
import { MailIndex } from "./apps/mail/views/mail-index.jsx"
import { NoteIndex } from "./apps/note/views/note-index.jsx"
import { MailDetails } from "./apps/mail/views/mail-details.jsx"
import { NoteEdit } from './apps/note/cmps/note-edit.jsx'
export function App() {
return <Router>
<section className="app">
<AppHeader />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/mail/:folder" element={<MailIndex />} >
<Route path="/mail/:folder/:mailId" element={<MailDetails />} />
</Route>
<Route path="/note/:folder" element={<NoteIndex />}>
{/* <Route path="/note/:folder" element={<NoteIndex />} /> */}
<Route path="/note/:folder/edit/:noteId" element={<NoteEdit />} />
</Route>
</Routes>
</section>
</Router>
}