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

View file

@ -10,7 +10,6 @@
"dependencies": {
"@expo/vector-icons": "^10.0.0",
"@react-native-community/status-bar": "^1.0.3",
"@shoutem/theme": "^0.11.3",
"expo": "^36.0.0",
"expo-font": "~8.0.0",
"expo-linear-gradient": "~8.0.0",
@ -27,11 +26,8 @@
"react-native-calendars": "^1.212.0",
"react-native-gesture-handler": "~1.5.0",
"react-native-material-menu": "^0.6.7",
"react-native-modal": "^11.3.1",
"react-native-modalize": "^1.3.6",
"react-native-paper": "^2.16.0",
"react-native-platform-touchable": "^1.1.1",
"react-native-reanimated": "~1.4.0",
"react-native-render-html": "^4.1.2",
"react-native-side-menu": "^1.1.3",
"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}
searchCallback={(text) => this.search(text)}
shouldFocusSearchBar={this.shouldFocusSearchBar}
rightButton={this.getSortMenu()}/>
rightButton={this.getSortMenu()}
/>
<Content>
<FlatList
data={this.state.currentlyDisplayedData}
extraData={this.state.currentlyDisplayedData}
keyExtractor={(item) => item.name + item.code}
style={{minHeight: 300, width: '100%'}}
renderItem={({item}) =>
<ListItem
thumbnail
onPress={() => {
this.showItemDetails(item);
}}
>
<Left>
<Thumbnail square source={{uri: item.image}}/>
</Left>
<Body>
<Text style={{marginLeft: 20}}>
{item.name}
</Text>
<Text note style={{
marginLeft: 20,
color: this.getStockColor(parseInt(item.quantity))
}}>
{item.quantity + ' ' + i18n.t('proximoScreen.inStock')}
</Text>
</Body>
<Right>
<Text style={{fontWeight: "bold"}}>
{item.price}
</Text>
</Right>
</ListItem>}
/>
</Content>
<FlatList
data={this.state.currentlyDisplayedData}
extraData={this.state.currentlyDisplayedData}
keyExtractor={(item) => item.name + item.code}
style={{minHeight: 300, width: '100%'}}
renderItem={({item}) =>
<ListItem
thumbnail
onPress={() => {
this.showItemDetails(item);
}}
>
<Left>
<Thumbnail square source={{uri: item.image}}/>
</Left>
<Body>
<Text style={{marginLeft: 20}}>
{item.name}
</Text>
<Text note style={{
marginLeft: 20,
color: this.getStockColor(parseInt(item.quantity))
}}>
{item.quantity + ' ' + i18n.t('proximoScreen.inStock')}
</Text>
</Body>
<Right>
<Text style={{fontWeight: "bold"}}>
{item.price}
</Text>
</Right>
</ListItem>}
/>
</Container>
);
}