How to use the react-native-router-flux.Actions.replace function in react-native-router-flux

To help you get started, we’ve selected a few react-native-router-flux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EdgeApp / edge-react-gui / src / actions / SendConfirmationActions.js View on Github external
edgeSignedTransaction.metadata = edgeMetadata
    edgeSignedTransaction.wallet = wallet

    playSendSound().catch(error => console.log(error)) // Fail quietly
    Alert.alert(s.strings.transaction_success, s.strings.transaction_success_message, [
      {
        onPress () {},
        style: 'default',
        text: s.strings.string_ok
      }
    ])

    if (guiMakeSpendInfo.onDone) {
      guiMakeSpendInfo.onDone(null, edgeSignedTransaction)
    } else {
      Actions.replace(TRANSACTION_DETAILS, { edgeTransaction: edgeSignedTransaction })
    }
  } catch (e) {
    console.log(e)
    dispatch(updateSpendPending(false))
    let message = sprintf(s.strings.transaction_failure_message, e.message)
    if (e.name === 'ErrorEosInsufficientCpu') {
      message = s.strings.send_confirmation_eos_error_cpu
    } else if (e.name === 'ErrorEosInsufficientNet') {
      message = s.strings.send_confirmation_eos_error_net
    } else if (e.name === 'ErrorEosInsufficientRam') {
      message = s.strings.send_confirmation_eos_error_ram
    }

    dispatch(updateTransaction(edgeSignedTransaction, null, true, new Error('broadcastError')))
    Alert.alert(s.strings.transaction_failure, message, [
      {
github Codebrahma / React-Native-Restaurant-App / src / screens / CuisineRestaurantsScreen.js View on Github external
async componentDidMount() {
    console.log('in cdm');

    const value = await AsyncStorage.getItem('authToken');
    if (!value) {
      Actions.replace('loginScreen');
    }

    console.log('in');
      this.props.fetchRestaurantByType(this.props.cuisineType, true);
  }
github HenryQuan / WoWs-Info-Re / wowsinfo / src / ui / page / Welcome / Agreement.tsx View on Github external
              <button> Actions.replace('Welcome')}&gt;{langs.agreement_retry}</button>
github ConnectyCube / connectycube-reactnative-samples / RNChat / src / components / CreateDialogScreen / CreateDialogInput.js View on Github external
toChat(dialog) {
    if (Actions.currentScene !== 'chat') {
      Actions.replace('chat', {
        dialog: dialog,
        title: dialog.name,
      });

      this.props.clearSelectedUser();
      this.props.clearSearchUsersList();
    }
  }
github Codebrahma / React-Native-Restaurant-App / src / screens / HomeScreen.js View on Github external
async componentDidMount() {
    const value = await AsyncStorage.getItem('authToken');
    if (!value) {
      Actions.replace('loginScreen');
    }

    if (this.props.rightTitle === 'Sign Out') {
      this.props.fetchRestaurant();
      this.props.fetchCuisineTypes();
      this.props.fetchCartItems();
    }
  }
github Codebrahma / React-Native-Restaurant-App / app / components / Signup.js View on Github external
render() {
    const {
      loading, onSignupSubmit,
      onEmailChange, onPasswordChange,
      registerError, disableSignUp,
      registerMessage,
    } = this.props;

    if (registerMessage &amp;&amp; registerMessage.success) {
      Actions.replace('loginScreen', {
        loginError: {
          message: 'Sign Up successful',
        },
      });
    }

    return (
      
        Sign Up
        <br size="{20}">
        {registerError &amp;&amp; {registerError.message}}
        {registerMessage &amp;&amp; {JSON.stringify(registerMessage)}}