Skip to content

Commit

Permalink
Add additional back buttons to cancel to cancel transaction of BYO an…
Browse files Browse the repository at this point in the history
…d borrow
  • Loading branch information
tsh22 committed Dec 22, 2021
1 parent a292a54 commit e591e2a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
6 changes: 6 additions & 0 deletions screens/borrow-screens/BorrowSelectionScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ export default function BorrowSelectionScreen({ navigation, route }) {
setContainerNum={setContainerNum}
/>
{renderNextButton()}
<TouchableOpacity
onPress={() => navigation.popToTop()}
style={[globalStyles.button, { width: "90%" }]}
>
<Text style={globalStyles.buttonText}>Cancel</Text>
</TouchableOpacity>
</View>
<FooterText />
</View>
Expand Down
11 changes: 8 additions & 3 deletions screens/byo-screens/BYOScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ export default function BYOScreen({ navigation }) {
}}
>
<View style={styles.box}>

<TouchableOpacity
{/* <TouchableOpacity
onPress={() => navigation.navigate("BYO Unsuccessful Screen")}
style={styles.imagePlaceholder}
>
Expand All @@ -107,12 +106,18 @@ export default function BYOScreen({ navigation }) {
style={styles.imagePlaceholder}
>
<Text>(Selection screen)</Text>
</TouchableOpacity>
</TouchableOpacity> */}
<Text style={styles.text}>Scan the QR code!</Text>
<BarCodeScanner
onBarCodeScanned={scanned ? undefined : handleBarCodeScanned}
style={styles.qr}
/>
<TouchableOpacity
onPress={() => navigation.popToTop()}
style={[globalStyles.buttonTop, { marginTop: 30, width: "80%" }]}
>
<Text style={globalStyles.buttonText}>Back to Home </Text>
</TouchableOpacity>
</View>
<FooterText />
</View>
Expand Down
6 changes: 6 additions & 0 deletions screens/byo-screens/BYOSelectionScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ export default function BYOSelectionScreen({ navigation, route }) {
setContainerNum={setContainerNum}
/>
{renderNextButton()}
<TouchableOpacity
onPress={() => navigation.popToTop()}
style={[globalStyles.button, { width: "90%" }]}
>
<Text style={globalStyles.buttonText}>Cancel</Text>
</TouchableOpacity>
</View>
<FooterText />
</View>
Expand Down

0 comments on commit e591e2a

Please sign in to comment.