Fixed warnings and removed unnecessary dependencies

This commit is contained in:
keplyx 2020-01-26 19:27:20 +01:00
parent a1a0e0b7f0
commit de5beb4b86
3 changed files with 35 additions and 45 deletions

View file

@ -79,10 +79,6 @@ export default class SideBar extends React.Component<Props, State> {
render() { render() {
return ( return (
<Container style={{backgroundColor: ThemeManager.getCurrentThemeVariables().sideMenuBgColor}}> <Container style={{backgroundColor: ThemeManager.getCurrentThemeVariables().sideMenuBgColor}}>
<Content
bounces={false}
style={{flex: 1, top: -1}}
>
<Image source={drawerCover} style={styles.drawerCover}/> <Image source={drawerCover} style={styles.drawerCover}/>
<FlatList <FlatList
data={this.dataSet} data={this.dataSet}
@ -126,7 +122,6 @@ export default class SideBar extends React.Component<Props, State> {
</Right>} </Right>}
</ListItem>} </ListItem>}
/> />
</Content>
</Container> </Container>
); );
} }

View file

@ -10,7 +10,6 @@
"dependencies": { "dependencies": {
"@expo/vector-icons": "^10.0.0", "@expo/vector-icons": "^10.0.0",
"@react-native-community/status-bar": "^1.0.3", "@react-native-community/status-bar": "^1.0.3",
"@shoutem/theme": "^0.11.3",
"expo": "^36.0.0", "expo": "^36.0.0",
"expo-font": "~8.0.0", "expo-font": "~8.0.0",
"expo-linear-gradient": "~8.0.0", "expo-linear-gradient": "~8.0.0",
@ -27,11 +26,8 @@
"react-native-calendars": "^1.212.0", "react-native-calendars": "^1.212.0",
"react-native-gesture-handler": "~1.5.0", "react-native-gesture-handler": "~1.5.0",
"react-native-material-menu": "^0.6.7", "react-native-material-menu": "^0.6.7",
"react-native-modal": "^11.3.1",
"react-native-modalize": "^1.3.6", "react-native-modalize": "^1.3.6",
"react-native-paper": "^2.16.0",
"react-native-platform-touchable": "^1.1.1", "react-native-platform-touchable": "^1.1.1",
"react-native-reanimated": "~1.4.0",
"react-native-render-html": "^4.1.2", "react-native-render-html": "^4.1.2",
"react-native-side-menu": "^1.1.3", "react-native-side-menu": "^1.1.3",
"react-native-status-bar-height": "^2.3.1", "react-native-status-bar-height": "^2.3.1",

View file

@ -311,43 +311,42 @@ export default class ProximoListScreen extends React.Component<Props, State> {
hasSearchField={true} hasSearchField={true}
searchCallback={(text) => this.search(text)} searchCallback={(text) => this.search(text)}
shouldFocusSearchBar={this.shouldFocusSearchBar} shouldFocusSearchBar={this.shouldFocusSearchBar}
rightButton={this.getSortMenu()}/> rightButton={this.getSortMenu()}
/>
<Content> <FlatList
<FlatList data={this.state.currentlyDisplayedData}
data={this.state.currentlyDisplayedData} extraData={this.state.currentlyDisplayedData}
extraData={this.state.currentlyDisplayedData} keyExtractor={(item) => item.name + item.code}
keyExtractor={(item) => item.name + item.code} style={{minHeight: 300, width: '100%'}}
style={{minHeight: 300, width: '100%'}} renderItem={({item}) =>
renderItem={({item}) => <ListItem
<ListItem thumbnail
thumbnail onPress={() => {
onPress={() => { this.showItemDetails(item);
this.showItemDetails(item); }}
}} >
> <Left>
<Left> <Thumbnail square source={{uri: item.image}}/>
<Thumbnail square source={{uri: item.image}}/> </Left>
</Left> <Body>
<Body> <Text style={{marginLeft: 20}}>
<Text style={{marginLeft: 20}}> {item.name}
{item.name} </Text>
</Text> <Text note style={{
<Text note style={{ marginLeft: 20,
marginLeft: 20, color: this.getStockColor(parseInt(item.quantity))
color: this.getStockColor(parseInt(item.quantity)) }}>
}}> {item.quantity + ' ' + i18n.t('proximoScreen.inStock')}
{item.quantity + ' ' + i18n.t('proximoScreen.inStock')} </Text>
</Text> </Body>
</Body> <Right>
<Right> <Text style={{fontWeight: "bold"}}>
<Text style={{fontWeight: "bold"}}> {item.price}
{item.price} </Text>
</Text> </Right>
</Right> </ListItem>}
</ListItem>} />
/>
</Content>
</Container> </Container>
); );
} }