forked from vergnet/application-amicale
Fix flow errors and remove unused functions
This commit is contained in:
parent
d5e1e6c7eb
commit
61647ce6ec
2 changed files with 5 additions and 30 deletions
|
@ -9,7 +9,7 @@ import type {CardTitleIconPropsType} from '../../constants/PaperStyles';
|
|||
|
||||
const LOGO = 'https://etud.insa-toulouse.fr/~amicale_app/images/Proxiwash.png';
|
||||
|
||||
export type LaverieType = {
|
||||
export type LaundromatType = {
|
||||
id: string,
|
||||
title: string,
|
||||
subtitle: string,
|
||||
|
@ -49,7 +49,7 @@ export const PROXIWASH_DATA = {
|
|||
* Class defining the proxiwash about screen.
|
||||
*/
|
||||
export default class ProxiwashAboutScreen extends React.Component<null> {
|
||||
static getCardItem(item: LaverieType): React.Node {
|
||||
static getCardItem(item: LaundromatType): React.Node {
|
||||
return (
|
||||
<Card style={{margin: 5}}>
|
||||
<Card.Title
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import * as React from 'react';
|
||||
import {Alert, View} from 'react-native';
|
||||
import i18n from 'i18n-js';
|
||||
import {Avatar, Button, Card, List, Text, withTheme} from 'react-native-paper';
|
||||
import {Avatar, Button, Card, Text, withTheme} from 'react-native-paper';
|
||||
import {StackNavigationProp} from '@react-navigation/stack';
|
||||
import {Modalize} from 'react-native-modalize';
|
||||
import WebSectionList from '../../components/Screens/WebSectionList';
|
||||
|
@ -26,8 +26,8 @@ import {
|
|||
import {MASCOT_STYLE} from '../../components/Mascot/Mascot';
|
||||
import MascotPopup from '../../components/Mascot/MascotPopup';
|
||||
import type {SectionListDataType} from '../../components/Screens/WebSectionList';
|
||||
import type {ListIconPropsType} from '../../constants/PaperStyles';
|
||||
import {PROXIWASH_DATA} from './ProxiwashAboutScreen';
|
||||
import type {LaundromatType} from './ProxiwashAboutScreen';
|
||||
|
||||
const modalStateStrings = {};
|
||||
|
||||
|
@ -343,31 +343,6 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
|
|||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a chevron icon
|
||||
*
|
||||
* @param props
|
||||
* @return {*}
|
||||
*/
|
||||
static getChevronIcon(props: ListIconPropsType): React.Node {
|
||||
return (
|
||||
<List.Icon color={props.color} style={props.style} icon="chevron-right" />
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a custom list item icon
|
||||
*
|
||||
* @param item The item to show the icon for
|
||||
* @param props
|
||||
* @return {*}
|
||||
*/
|
||||
static getItemIcon(item: ListItemType, props: ListIconPropsType): React.Node {
|
||||
return (
|
||||
<List.Icon color={props.color} style={props.style} icon={item.icon} />
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the dataset to be used by the FlatList
|
||||
*
|
||||
|
@ -472,7 +447,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
|
|||
render(): React.Node {
|
||||
const {state} = this;
|
||||
const {navigation} = this.props;
|
||||
let data: LaverieType;
|
||||
let data: LaundromatType;
|
||||
switch (state.selectedWash) {
|
||||
case 'tripodeB':
|
||||
data = PROXIWASH_DATA.tripodeB;
|
||||
|
|
Loading…
Reference in a new issue