diff --git a/native/account/registration/registration-terms.react.js b/native/account/registration/registration-terms.react.js --- a/native/account/registration/registration-terms.react.js +++ b/native/account/registration/registration-terms.react.js @@ -67,6 +67,27 @@ } }, [register, userSelections, clearCachedSelections]); + const { navigation } = props; + React.useEffect(() => { + if (!registrationInProgress) { + return undefined; + } + navigation.setOptions({ + gestureEnabled: false, + headerLeft: null, + }); + const removeListener = navigation.addListener('beforeRemove', e => { + e.preventDefault(); + }); + return () => { + navigation.setOptions({ + gestureEnabled: true, + headerLeft: undefined, + }); + removeListener(); + }; + }, [navigation, registrationInProgress]); + const styles = useStyles(unboundStyles); const termsNotice = (