Skip to content

Commit

Permalink
feat: disable slide gesture around confirm slider button
Browse files Browse the repository at this point in the history
Signed-off-by: Prakhar Agarwal <[email protected]>
  • Loading branch information
Prakhar-Agarwal-byte committed May 1, 2024
1 parent 2a7f15f commit c0fe9d7
Showing 1 changed file with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from "react"
import { ActivityIndicator, TouchableOpacity, View } from "react-native"
import { PanGestureHandler } from "react-native-gesture-handler"
import ReactNativeHapticFeedback from "react-native-haptic-feedback"

import { gql } from "@apollo/client"
Expand Down Expand Up @@ -422,13 +423,18 @@ const SendBitcoinConfirmationScreen: React.FC<Props> = ({ route }) => {
</View>
) : null}
<View style={styles.buttonContainer}>
<GaloySliderButton
isLoading={sendPaymentLoading}
initialText={LL.SendBitcoinConfirmationScreen.slideToConfirm()}
loadingText={LL.SendBitcoinConfirmationScreen.slideConfirming()}
onSwipe={handleSendPayment}
disabled={!validAmount || hasAttemptedSend}
/>
{/* disable slide gestures in area around the slider button */}
<PanGestureHandler>
<View style={{ styles.sliderContainer }}>

Check failure on line 428 in app/screens/send-bitcoin-screen/send-bitcoin-confirmation-screen.tsx

View workflow job for this annotation

GitHub Actions / Check Code

',' expected.
<GaloySliderButton
isLoading={sendPaymentLoading}
initialText={LL.SendBitcoinConfirmationScreen.slideToConfirm()}
loadingText={LL.SendBitcoinConfirmationScreen.slideConfirming()}
onSwipe={handleSendPayment}
disabled={!validAmount || hasAttemptedSend}
/>
</View>
</PanGestureHandler>
</View>
</View>
</Screen>
Expand All @@ -442,6 +448,7 @@ const useStyles = makeStyles(({ colors }) => ({
flex: 1,
},
fieldContainer: {
paddingHorizontal: 20,
marginBottom: 12,
},
noteText: {
Expand Down Expand Up @@ -537,7 +544,7 @@ const useStyles = makeStyles(({ colors }) => ({
alignItems: "center",
},
screenStyle: {
padding: 20,
paddingTop: 20,
flexGrow: 1,
},
iconContainer: {
Expand All @@ -560,4 +567,7 @@ const useStyles = makeStyles(({ colors }) => ({
justifyContent: "space-between",
alignItems: "center",
},
sliderContainer: {
padding: 20
}
}))

0 comments on commit c0fe9d7

Please sign in to comment.