How to use the @react-native-community/netinfo.NetInfoStateType.none function in @react-native-community/netinfo

To help you get started, we’ve selected a few @react-native-community/netinfo 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 zzorba / ArkhamCards / components / MyDecksComponent.tsx View on Github external
renderError() {
    const {
      error,
      networkType,
      isConnected,
      width,
    } = this.props;

    if (!error && networkType !== NetInfoStateType.none) {
      return null;
    }
    if (!isConnected || networkType === NetInfoStateType.none) {
      return (
        
      );
    }
    if (error === 'badAccessToken') {
      return (
        
          
        
      );
github zzorba / ArkhamCards / components / MyDecksComponent.tsx View on Github external
renderError() {
    const {
      error,
      networkType,
      isConnected,
      width,
    } = this.props;

    if (!error && networkType !== NetInfoStateType.none) {
      return null;
    }
    if (!isConnected || networkType === NetInfoStateType.none) {
      return (
        
      );
    }
    if (error === 'badAccessToken') {
      return (
github zzorba / ArkhamCards / components / CopyDeckDialog / index.tsx View on Github external
{ t`New Name` }
        
        
        { this.renderDeckSelector() }
        
          { t`Deck Type` }
        
        
        { (!isConnected || networkType === NetInfoStateType.none) && (
          
            
              { t`You seem to be offline. Refresh Network?` }
            
          
        ) }

        { !!error && (
github zzorba / ArkhamCards / components / NewDeckView / NewDeckOptionsDialog.tsx View on Github external
{ t`Deck Type` }
        
        
        { !signedIn && (
          
            { t`Visit Settings to sign in to ArkhamDB.` }
          
        ) }
        { (!isConnected || networkType === NetInfoStateType.none) && (
          
            
              { t`You seem to be offline. Refresh Network?` }
            
          
        ) }
        { hasStarterDeck && (
          
        ) }
      
    );
github zzorba / ArkhamCards / components / NewDeckView / NewDeckOptionsDialog.tsx View on Github external
const {
      signedIn,
      networkType,
      isConnected,
      saveNewDeck,
    } = this.props;
    const {
      deckName,
      offlineDeck,
      saving,
      starterDeck,
      tabooSetId,
    } = this.state;
    const investigator = this.investigator();
    if (investigator && (!saving || isRetry)) {
      const local = (offlineDeck || !signedIn || !isConnected || networkType === NetInfoStateType.none);
      let slots = this.getSlots();
      if (starterDeck && starterDecks[investigator.code]) {
        slots = starterDecks[investigator.code];
      }
      this.setState({
        saving: true,
      });
      saveNewDeck({
        local,
        deckName: deckName || t`New Deck`,
        investigatorCode: investigator.code,
        slots: slots,
        tabooSetId,
      }).then(
        this._showNewDeck,
        () => {
github zzorba / ArkhamCards / components / CopyDeckDialog / index.tsx View on Github external
{ this.renderDeckSelector() }
        
          { t`Deck Type` }
        
        
        { (!isConnected || networkType === NetInfoStateType.none) && (
          
            
              { t`You seem to be offline. Refresh Network?` }
            
          
        ) }

        { !!error && (
          
        ) }