diff --git a/native/profile/secondary-device-qr-code-scanner.react.js b/native/profile/secondary-device-qr-code-scanner.react.js --- a/native/profile/secondary-device-qr-code-scanner.react.js +++ b/native/profile/secondary-device-qr-code-scanner.react.js @@ -316,8 +316,6 @@ [processDeviceListUpdate], ); - const onCancelScan = React.useCallback(() => setScanned(false), []); - const handleBarCodeScanned = React.useCallback( (barCodeEvent: BarCodeEvent) => { setScanned(true); @@ -328,7 +326,7 @@ { text: 'Cancel', style: 'cancel', - onPress: onCancelScan, + onPress: goBack, }, { text: 'Connect', @@ -338,7 +336,7 @@ { cancelable: false }, ); }, - [onCancelScan, onConnect], + [goBack, onConnect], ); if (hasPermission === null) {