Renacer Social, the app

App.tsx 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import { Redirect, Route } from "react-router-dom";
  2. import {
  3. IonApp,
  4. IonIcon,
  5. IonLabel,
  6. IonRouterOutlet,
  7. IonTabBar,
  8. IonTabButton,
  9. IonTabs,
  10. setupIonicReact,
  11. } from "@ionic/react";
  12. import { IonReactRouter } from "@ionic/react-router";
  13. import {
  14. ellipse,
  15. informationCircleSharp,
  16. bookSharp,
  17. appsSharp,
  18. home,
  19. peopleCircleSharp,
  20. } from "ionicons/icons";
  21. import Home from "./pages/Home";
  22. /* Core CSS required for Ionic components to work properly */
  23. import "@ionic/react/css/core.css";
  24. /* Basic CSS for apps built with Ionic */
  25. import "@ionic/react/css/normalize.css";
  26. import "@ionic/react/css/structure.css";
  27. import "@ionic/react/css/typography.css";
  28. /* Optional CSS utils that can be commented out */
  29. import "@ionic/react/css/padding.css";
  30. import "@ionic/react/css/float-elements.css";
  31. import "@ionic/react/css/text-alignment.css";
  32. import "@ionic/react/css/text-transformation.css";
  33. import "@ionic/react/css/flex-utils.css";
  34. import "@ionic/react/css/display.css";
  35. /* Theme variables */
  36. import "./theme/variables.css";
  37. import AdviceListPage from "./pages/AdviceListPage";
  38. import LawListPage from "./pages/LawListPage";
  39. import ArticlePage from "./pages/ArticlePage";
  40. import "./theme/global.css";
  41. import "react-notion-x/src/styles.css";
  42. import AboutListPage from "./pages/AboutListPage";
  43. import CasitaPage from "./pages/services/CasitaPage";
  44. import CrecemosPage from "./pages/services/CrecemosPage";
  45. import LazosPage from "./pages/services/LazosPage";
  46. import SupervisadasPage from "./pages/services/SupervisadasPage";
  47. setupIonicReact();
  48. const App: React.FC = () => (
  49. <IonApp>
  50. <IonReactRouter>
  51. <IonTabs>
  52. <IonRouterOutlet>
  53. <Route exact path="/home">
  54. <Home />
  55. </Route>
  56. <Route path="/advice">
  57. <AdviceListPage />
  58. </Route>
  59. <Route path="/laws">
  60. <LawListPage />
  61. </Route>
  62. <Route path="/article/:articleId" component={ArticlePage} />
  63. <Route path="/services/lazos">
  64. <LazosPage />
  65. </Route>
  66. <Route path="/services/crecemos">
  67. <CrecemosPage />
  68. </Route>
  69. <Route path="/services/supervisadas">
  70. <SupervisadasPage />
  71. </Route>
  72. <Route path="/about">
  73. <AboutListPage />
  74. </Route>
  75. <Route path="/services/casita">
  76. <CasitaPage />
  77. </Route>
  78. <Route exact path="/">
  79. <Redirect to="/home" />
  80. </Route>
  81. </IonRouterOutlet>
  82. <IonTabBar slot="bottom">
  83. <IonTabButton tab="home" href="/home">
  84. <IonIcon icon={home} />
  85. <IonLabel>Home</IonLabel>
  86. </IonTabButton>
  87. <IonTabButton tab="advice" href="/advice">
  88. <IonIcon icon={peopleCircleSharp} />
  89. <IonLabel>Advice</IonLabel>
  90. </IonTabButton>
  91. <IonTabButton tab="laws" href="/laws">
  92. <IonIcon icon={bookSharp} />
  93. <IonLabel>Laws</IonLabel>
  94. </IonTabButton>
  95. <IonTabButton tab="about" href="/about">
  96. <IonIcon icon={informationCircleSharp} />
  97. <IonLabel>About</IonLabel>
  98. </IonTabButton>
  99. </IonTabBar>
  100. </IonTabs>
  101. </IonReactRouter>
  102. </IonApp>
  103. );
  104. export default App;