瀏覽代碼

[mant] Clean up sprint code

Sergio Mattei 1 年之前
父節點
當前提交
a2a6791cad
共有 7 個檔案被更改,包括 10 行新增68 行删除
  1. 4
    12
      src/App.tsx
  2. 6
    5
      src/pages/Home.tsx
  3. 0
    0
      src/pages/Tab1.css
  4. 0
    26
      src/pages/Tab1.tsx
  5. 0
    0
      src/pages/Tab3.css
  6. 0
    25
      src/pages/Tab3.tsx
  7. 0
    0
      src/pages/home.css

+ 4
- 12
src/App.tsx 查看文件

@@ -11,9 +11,7 @@ import {
11 11
 } from "@ionic/react";
12 12
 import { IonReactRouter } from "@ionic/react-router";
13 13
 import { ellipse, square, triangle } from "ionicons/icons";
14
-import Tab1 from "./pages/Tab1";
15
-import Tab2 from "./pages/home";
16
-import Tab3 from "./pages/Tab3";
14
+import Home from "./pages/Home";
17 15
 
18 16
 /* Core CSS required for Ionic components to work properly */
19 17
 import "@ionic/react/css/core.css";
@@ -41,17 +39,11 @@ const App: React.FC = () => (
41 39
     <IonReactRouter>
42 40
       <IonTabs>
43 41
         <IonRouterOutlet>
44
-          <Route exact path="/tab1">
45
-            <Tab1 />
46
-          </Route>
47
-          <Route exact path="/tab2">
48
-            <Tab2 />
49
-          </Route>
50
-          <Route path="/tab3">
51
-            <Tab3 />
42
+          <Route exact path="/home">
43
+            <Home />
52 44
           </Route>
53 45
           <Route exact path="/">
54
-            <Redirect to="/tab1" />
46
+            <Redirect to="/home" />
55 47
           </Route>
56 48
         </IonRouterOutlet>
57 49
         <IonTabBar slot="bottom">

src/pages/home.tsx → src/pages/Home.tsx 查看文件

@@ -5,12 +5,10 @@ import {
5 5
   IonTitle,
6 6
   IonToolbar,
7 7
 } from "@ionic/react";
8
-import ExploreContainer from "../components/ExploreContainer";
9
-import "./home.css";
10 8
 import "../components/ListComponent";
11 9
 import ListComponent from "../components/ListComponent";
12 10
 
13
-const Tab2: React.FC = () => {
11
+const Home: React.FC = () => {
14 12
   return (
15 13
     <IonPage>
16 14
       <IonHeader>
@@ -32,10 +30,13 @@ const Tab2: React.FC = () => {
32 30
           </p>
33 31
         </div>
34 32
 
35
-        <ListComponent laws={["eliam", "Sergio"]} title="Articulos Recientes" />
33
+        <ListComponent
34
+          laws={["Articulo 1", "Articulo 2"]}
35
+          title="Articulos Recientes"
36
+        />
36 37
       </IonContent>
37 38
     </IonPage>
38 39
   );
39 40
 };
40 41
 
41
-export default Tab2;
42
+export default Home;

+ 0
- 0
src/pages/Tab1.css 查看文件


+ 0
- 26
src/pages/Tab1.tsx 查看文件

@@ -1,26 +0,0 @@
1
-import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';
2
-import './Tab1.css';
3
-import '../components/ListComponent'
4
-import ListComponent from '../components/ListComponent';
5
-
6
-const Tab1: React.FC = () => {
7
-  return (
8
-    <IonPage>
9
-      <IonHeader>
10
-        <IonToolbar>
11
-          <IonTitle>List component test!</IonTitle>
12
-        </IonToolbar>
13
-      </IonHeader>
14
-      <IonContent fullscreen>
15
-        <IonHeader collapse="condense">
16
-          <IonToolbar>
17
-            <IonTitle size="large">This is a list</IonTitle>
18
-          </IonToolbar>
19
-        </IonHeader>
20
-       <ListComponent laws={[]}/>
21
-      </IonContent>
22
-    </IonPage>
23
-  );
24
-};
25
-
26
-export default Tab1;

+ 0
- 0
src/pages/Tab3.css 查看文件


+ 0
- 25
src/pages/Tab3.tsx 查看文件

@@ -1,25 +0,0 @@
1
-import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';
2
-import ExploreContainer from '../components/ExploreContainer';
3
-import './Tab3.css';
4
-
5
-const Tab3: React.FC = () => {
6
-  return (
7
-    <IonPage>
8
-      <IonHeader>
9
-        <IonToolbar>
10
-          <IonTitle>Tab 3</IonTitle>
11
-        </IonToolbar>
12
-      </IonHeader>
13
-      <IonContent fullscreen>
14
-        <IonHeader collapse="condense">
15
-          <IonToolbar>
16
-            <IonTitle size="large">Tab 3</IonTitle>
17
-          </IonToolbar>
18
-        </IonHeader>
19
-        <ExploreContainer name="Tab 3 page" />
20
-      </IonContent>
21
-    </IonPage>
22
-  );
23
-};
24
-
25
-export default Tab3;

+ 0
- 0
src/pages/home.css 查看文件