Browse Source

Fix flow errors and remove unused functions

Arnaud Vergnet 1 year ago
parent
commit
61647ce6ec

+ 2
- 2
src/screens/Proxiwash/ProxiwashAboutScreen.js View File

@@ -9,7 +9,7 @@ import type {CardTitleIconPropsType} from '../../constants/PaperStyles';
9 9
 
10 10
 const LOGO = 'https://etud.insa-toulouse.fr/~amicale_app/images/Proxiwash.png';
11 11
 
12
-export type LaverieType = {
12
+export type LaundromatType = {
13 13
   id: string,
14 14
   title: string,
15 15
   subtitle: string,
@@ -49,7 +49,7 @@ export const PROXIWASH_DATA = {
49 49
  * Class defining the proxiwash about screen.
50 50
  */
51 51
 export default class ProxiwashAboutScreen extends React.Component<null> {
52
-  static getCardItem(item: LaverieType): React.Node {
52
+  static getCardItem(item: LaundromatType): React.Node {
53 53
     return (
54 54
       <Card style={{margin: 5}}>
55 55
         <Card.Title

+ 3
- 28
src/screens/Proxiwash/ProxiwashScreen.js View File

@@ -3,7 +3,7 @@
3 3
 import * as React from 'react';
4 4
 import {Alert, View} from 'react-native';
5 5
 import i18n from 'i18n-js';
6
-import {Avatar, Button, Card, List, Text, withTheme} from 'react-native-paper';
6
+import {Avatar, Button, Card, Text, withTheme} from 'react-native-paper';
7 7
 import {StackNavigationProp} from '@react-navigation/stack';
8 8
 import {Modalize} from 'react-native-modalize';
9 9
 import WebSectionList from '../../components/Screens/WebSectionList';
@@ -26,8 +26,8 @@ import {
26 26
 import {MASCOT_STYLE} from '../../components/Mascot/Mascot';
27 27
 import MascotPopup from '../../components/Mascot/MascotPopup';
28 28
 import type {SectionListDataType} from '../../components/Screens/WebSectionList';
29
-import type {ListIconPropsType} from '../../constants/PaperStyles';
30 29
 import {PROXIWASH_DATA} from './ProxiwashAboutScreen';
30
+import type {LaundromatType} from './ProxiwashAboutScreen';
31 31
 
32 32
 const modalStateStrings = {};
33 33
 
@@ -344,31 +344,6 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
344 344
   }
345 345
 
346 346
   /**
347
-   * Gets a chevron icon
348
-   *
349
-   * @param props
350
-   * @return {*}
351
-   */
352
-  static getChevronIcon(props: ListIconPropsType): React.Node {
353
-    return (
354
-      <List.Icon color={props.color} style={props.style} icon="chevron-right" />
355
-    );
356
-  }
357
-
358
-  /**
359
-   * Gets a custom list item icon
360
-   *
361
-   * @param item The item to show the icon for
362
-   * @param props
363
-   * @return {*}
364
-   */
365
-  static getItemIcon(item: ListItemType, props: ListIconPropsType): React.Node {
366
-    return (
367
-      <List.Icon color={props.color} style={props.style} icon={item.icon} />
368
-    );
369
-  }
370
-
371
-  /**
372 347
    * Creates the dataset to be used by the FlatList
373 348
    *
374 349
    * @param fetchedData
@@ -472,7 +447,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
472 447
   render(): React.Node {
473 448
     const {state} = this;
474 449
     const {navigation} = this.props;
475
-    let data: LaverieType;
450
+    let data: LaundromatType;
476 451
     switch (state.selectedWash) {
477 452
       case 'tripodeB':
478 453
         data = PROXIWASH_DATA.tripodeB;

Loading…
Cancel
Save