-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathApp.tsx
36 lines (34 loc) · 1.12 KB
/
App.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
import { Routes, Route, Navigate } from "react-router-dom";
import { Projects } from "./views/Projects/Projects";
import { BoardsListView } from "./views/BoardListView/BoardsListView";
import { Board } from "./views/Board/Board";
import Navbar from "./components/Navbar/Navbar";
import PrivateRoute from "./components/PrivateRoute";
import { toProjects } from "./views/routes";
import { IssueDetails } from "./views/IssueDetails/IssueDetails";
const App = () => {
return (
<>
<Navbar />
<PrivateRoute>
<Routes>
<Route path={toProjects} element={<Projects />} />
<Route
path='projects/:projectName&:projectId'
element={<BoardsListView />}
/>
<Route
path='projects/:projectName&:projectId/:board&:boardId'
element={<Board />}
/>
<Route
path='projects/:projectName&:projectId/:board&:boardId/:issue&:issueId'
element={<IssueDetails />}
/>
<Route path='*' element={<Navigate to={toProjects} />} />
</Routes>
</PrivateRoute>
</>
);
};
export default App;