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 @@ -388,8 +388,6 @@ [processDeviceListUpdate], ); - const onCancelScan = React.useCallback(() => setScanned(false), []); - const handleBarCodeScanned = React.useCallback( (barCodeEvent: BarCodeEvent) => { setScanned(true); @@ -400,7 +398,7 @@ { text: 'Cancel', style: 'cancel', - onPress: onCancelScan, + onPress: goBack, }, { text: 'Connect', @@ -410,7 +408,7 @@ { cancelable: false }, ); }, - [onCancelScan, onConnect], + [goBack, onConnect], ); if (hasPermission === null) {