|
@@ -10,7 +10,7 @@ import {
|
10
|
10
|
setupIonicReact,
|
11
|
11
|
} from "@ionic/react";
|
12
|
12
|
import { IonReactRouter } from "@ionic/react-router";
|
13
|
|
-import { ellipse, square, triangle } from "ionicons/icons";
|
|
13
|
+import { ellipse, home } from "ionicons/icons";
|
14
|
14
|
import Home from "./pages/Home";
|
15
|
15
|
|
16
|
16
|
/* Core CSS required for Ionic components to work properly */
|
|
@@ -31,6 +31,9 @@ import "@ionic/react/css/display.css";
|
31
|
31
|
|
32
|
32
|
/* Theme variables */
|
33
|
33
|
import "./theme/variables.css";
|
|
34
|
+import AdviceListPage from "./pages/AdviceListPage";
|
|
35
|
+import LawListPage from "./pages/LawListPage";
|
|
36
|
+import ArticlePage from "./pages/ArticlePage";
|
34
|
37
|
|
35
|
38
|
setupIonicReact();
|
36
|
39
|
|
|
@@ -42,22 +45,29 @@ const App: React.FC = () => (
|
42
|
45
|
<Route exact path="/home">
|
43
|
46
|
<Home />
|
44
|
47
|
</Route>
|
|
48
|
+ <Route path="/advice">
|
|
49
|
+ <AdviceListPage />
|
|
50
|
+ </Route>
|
|
51
|
+ <Route path="/laws">
|
|
52
|
+ <LawListPage />
|
|
53
|
+ </Route>
|
|
54
|
+ <Route path="/article/:slug" component={ArticlePage} />
|
45
|
55
|
<Route exact path="/">
|
46
|
56
|
<Redirect to="/home" />
|
47
|
57
|
</Route>
|
48
|
58
|
</IonRouterOutlet>
|
49
|
59
|
<IonTabBar slot="bottom">
|
50
|
|
- <IonTabButton tab="tab1" href="/tab1">
|
51
|
|
- <IonIcon icon={triangle} />
|
52
|
|
- <IonLabel>Tab 1</IonLabel>
|
|
60
|
+ <IonTabButton tab="home" href="/home">
|
|
61
|
+ <IonIcon icon={home} />
|
|
62
|
+ <IonLabel>Home</IonLabel>
|
53
|
63
|
</IonTabButton>
|
54
|
|
- <IonTabButton tab="tab2" href="/tab2">
|
|
64
|
+ <IonTabButton tab="advice" href="/advice">
|
55
|
65
|
<IonIcon icon={ellipse} />
|
56
|
|
- <IonLabel>Tab 2</IonLabel>
|
|
66
|
+ <IonLabel>Advice</IonLabel>
|
57
|
67
|
</IonTabButton>
|
58
|
|
- <IonTabButton tab="tab3" href="/tab3">
|
59
|
|
- <IonIcon icon={square} />
|
60
|
|
- <IonLabel>Tab 3</IonLabel>
|
|
68
|
+ <IonTabButton tab="laws" href="/laws">
|
|
69
|
+ <IonIcon icon={ellipse} />
|
|
70
|
+ <IonLabel>Laws</IonLabel>
|
61
|
71
|
</IonTabButton>
|
62
|
72
|
</IonTabBar>
|
63
|
73
|
</IonTabs>
|