Skip to content

Commit

Permalink
bottone checkout disabilitato quando il carrello è vuoto
Browse files Browse the repository at this point in the history
  • Loading branch information
Bixio999 committed Jan 5, 2020
1 parent 9b39741 commit 9797c86
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Components/Cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,16 @@ class Cart extends React.Component {
<View style={styles.searchRow}>
<View style={styles.suggestionsRow}>
<SubTitle text={"Procedi all'ordine!"} />
<Label text={"Totale " + this.state.total + "€"} />
<Label text={"Totale " + (this.state.total != null ? this.state.total : 0) + "€"} />
</View>
<View style={{opacity: (this.state.total != null)? 1 : 0.4}}
pointerEvents={(this.state.total != null)? "auto" : "none"}
>
<Button
text={"check out"}
onPress={this.provider.navigateCheckOut}
/>
</View>
<Button
text={"check out"}
onPress={this.provider.navigateCheckOut}
/>
</View>
</FlatCard>
<Separator />
Expand Down

0 comments on commit 9797c86

Please sign in to comment.