Browse Source

Fix flow errors and remove unused functions

Arnaud Vergnet 3 years ago
parent
commit
61647ce6ec

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

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

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

3
 import * as React from 'react';
3
 import * as React from 'react';
4
 import {Alert, View} from 'react-native';
4
 import {Alert, View} from 'react-native';
5
 import i18n from 'i18n-js';
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
 import {StackNavigationProp} from '@react-navigation/stack';
7
 import {StackNavigationProp} from '@react-navigation/stack';
8
 import {Modalize} from 'react-native-modalize';
8
 import {Modalize} from 'react-native-modalize';
9
 import WebSectionList from '../../components/Screens/WebSectionList';
9
 import WebSectionList from '../../components/Screens/WebSectionList';
26
 import {MASCOT_STYLE} from '../../components/Mascot/Mascot';
26
 import {MASCOT_STYLE} from '../../components/Mascot/Mascot';
27
 import MascotPopup from '../../components/Mascot/MascotPopup';
27
 import MascotPopup from '../../components/Mascot/MascotPopup';
28
 import type {SectionListDataType} from '../../components/Screens/WebSectionList';
28
 import type {SectionListDataType} from '../../components/Screens/WebSectionList';
29
-import type {ListIconPropsType} from '../../constants/PaperStyles';
30
 import {PROXIWASH_DATA} from './ProxiwashAboutScreen';
29
 import {PROXIWASH_DATA} from './ProxiwashAboutScreen';
30
+import type {LaundromatType} from './ProxiwashAboutScreen';
31
 
31
 
32
 const modalStateStrings = {};
32
 const modalStateStrings = {};
33
 
33
 
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
    * Creates the dataset to be used by the FlatList
347
    * Creates the dataset to be used by the FlatList
373
    *
348
    *
374
    * @param fetchedData
349
    * @param fetchedData
472
   render(): React.Node {
447
   render(): React.Node {
473
     const {state} = this;
448
     const {state} = this;
474
     const {navigation} = this.props;
449
     const {navigation} = this.props;
475
-    let data: LaverieType;
450
+    let data: LaundromatType;
476
     switch (state.selectedWash) {
451
     switch (state.selectedWash) {
477
       case 'tripodeB':
452
       case 'tripodeB':
478
         data = PROXIWASH_DATA.tripodeB;
453
         data = PROXIWASH_DATA.tripodeB;

Loading…
Cancel
Save