react-navigation#createStackNavigator JavaScript Examples

The following examples show how to use react-navigation#createStackNavigator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: routes.js    From haven with MIT License 6 votes vote down vote up
MeTab = createStackNavigator(
  {
    WalletMain: { screen: Me },
    Store: { screen: StoreScreen },
  },
  {
    headerMode: 'none',
    transitionConfig: () => ({
      screenInterpolator: sceneProps => StackViewStyleInterpolator.forHorizontal(sceneProps),
    }),
  },
)
Example #2
Source File: routes.js    From haven with MIT License 6 votes vote down vote up
SettingsStack = createStackNavigator(
  {
    MainSettings: { screen: Settings },
    ProfileSettings: { screen: ProfileSettings },
    Notifications: { screen: Notifications },
    Policies: { screen: Policies },
    ShippingAddress: { screen: ShippingAddress },
    ModerationSettings: { screen: ModerationSettings },
    StoreModerators: { screen: StoreModerators },
    AddModerators: { screen: AddModerators },
    ModeratorDetails: { screen: ModeratorDetails },
    BlockedNodes: { screen: BlockedNodes },
    Analytics: { screen: Analytics },
    Resync: { screen: Resync },
    AcceptedCoins: { screen: AcceptedCoins },
    ServerLog: { screen: ServerLog },
    NotificationSettings: { screen: NotificationSettings },
    BackupProfileInit: { screen: BackupProfileInit },
    BackupProfilePassword: { screen: BackupProfilePassword },
    BackupProfileUpload: { screen: BackupProfileUpload },
    RestoreProfileInit: { screen: RestoreProfileInit },
    RestoreProfilePassword: { screen: RestoreProfilePassword },
  },
  {
    headerMode: 'none',
    cardStyle: {
      shadowColor: 'transparent',
    },
    transitionConfig: () => ({
      screenInterpolator: sceneProps => StackViewStyleInterpolator.forHorizontal(sceneProps),
    }),
  },
)
Example #3
Source File: routes.js    From haven with MIT License 6 votes vote down vote up
OnboardingNavigator = createStackNavigator(
  {
    Onboarding: { screen: Onboarding },
    RestoreProfileInit: { screen: RestoreProfileInit },
    RestoreProfilePassword: { screen: RestoreProfilePassword },
    Privacy: { screen: Privacy },
  },
  {
    headerMode: 'none',
    transitionConfig: () => ({
      screenInterpolator: sceneProps => StackViewStyleInterpolator.forHorizontal(sceneProps),
    }),
  },
)
Example #4
Source File: index.js    From rakning-c19-app with MIT License 6 votes vote down vote up
LoggedOut = createStackNavigator(
  {
    Locale: LanguageScreen,
    Welcome: WelcomeScreen,
    Login: LoginScreen,
    Onboarding: OnboardingScreen,
  },
  {
    initialRouteName: 'Locale',
    headerMode: 'none',
  },
)
Example #5
Source File: App.js    From hugin-mobile with GNU Affero General Public License v3.0 6 votes vote down vote up
TransactionNavigator = createStackNavigator(
    {
        Transactions: TransactionsScreen,
        TransactionDetails: TransactionDetailsScreen,
    },
    {
        initialRouteName: 'Transactions',
        headerLayoutPreset: 'center',
        defaultNavigationOptions: {
            headerTitleStyle: {
                fontWeight: 'bold',
                color: 'Themes.darkMode.primaryColour',
            },
            headerTransparent: true,
            headerTintColor: Themes.darkMode.primaryColour,
        },
    }
)
Example #6
Source File: App.js    From hugin-mobile with GNU Affero General Public License v3.0 6 votes vote down vote up
TransferNavigator = createStackNavigator(
    {
        Transfer: TransferScreen,
        ChoosePayee: ChoosePayeeScreen,
        NewPayee: NewPayeeScreen,
        Confirm: ConfirmScreen,
        QrScanner: QrScannerScreen,
        SendTransaction: SendTransactionScreen,
        RequestPin: RequestPinScreen,
        RequestHardwareAuth: RequestHardwareAuthScreen,
    },
    {
        initialRouteName: 'ChoosePayee',
        headerLayoutPreset: 'center',
        defaultNavigationOptions: {
            headerTitleStyle: {
                fontWeight: 'bold',
                color: Themes.darkMode.primaryColour,
            },
            headerTransparent: true,
            headerTintColor: Themes.darkMode.primaryColour,
        },
    }
)
Example #7
Source File: App.js    From hugin-mobile with GNU Affero General Public License v3.0 6 votes vote down vote up
SettingsNavigator = createStackNavigator(
    {
        Settings: SettingsScreen,
        SwapCurrency: SwapCurrencyScreen,
        SwapNode: SwapNodeScreen,
        SwapLanguage: SwapLanguageScreen,
        ExportKeys: ExportKeysScreen,
        Logging: LoggingScreen,
        Faq: FaqScreen,
        DisableDoze: DisableDozeScreen,
        RequestPin: RequestPinScreen,
        ForgotPin: ForgotPinScreen,
        SetPin: SetPinScreen,
        ChooseAuthMethod: ChooseAuthMethodScreen,
        RequestHardwareAuth: RequestHardwareAuthScreen,
        Optimize: OptimizeScreen,
    },
    {
        initialRouteName: 'Settings',
        headerLayoutPreset: 'center',
        defaultNavigationOptions: {
            headerTitleStyle: {
                fontWeight: 'bold',
                color: Themes.darkMode.primaryColour,
            },
            headerTransparent: true,
            headerTintColor: Themes.darkMode.primaryColour,
        },
    }
)
Example #8
Source File: App.js    From hugin-mobile with GNU Affero General Public License v3.0 6 votes vote down vote up
RecipientNavigator = createStackNavigator(
    {
        Recipients: RecipientsScreen,
        ModifyPayee: ModifyPayeeScreen,
        ChatScreen: ChatScreen,
        NewPayee: NewPayeeScreen,
    },
    {
        initialRouteName: '',
        headerLayoutPreset: 'center',
        defaultNavigationOptions: {
            headerTitleStyle: {
                fontWeight: 'bold',
                color: Themes.darkMode.primaryColour,
            },
            headerTransparent: true,
            headerTintColor: Themes.darkMode.primaryColour,
        },
    }
)
Example #9
Source File: App.js    From hugin-mobile with GNU Affero General Public License v3.0 6 votes vote down vote up
BoardsNavigator = createStackNavigator(
    {
        BoardsHome: BoardsHomeScreen
    },
    {
        initialRouteName: '',
        headerLayoutPreset: 'center',
        defaultNavigationOptions: {
            headerTitleStyle: {
                fontWeight: 'bold',
                color: Themes.darkMode.primaryColour,
            },
            headerTransparent: true,
            headerTintColor: Themes.darkMode.primaryColour,
        },
    }
)
Example #10
Source File: routes.js    From haven with MIT License 5 votes vote down vote up
ShopTab = createStackNavigator(
  {
    ShopScreen: { screen: ShopScreen },
  },
  {
    headerMode: 'none',
  },
)
Example #11
Source File: routes.js    From haven with MIT License 5 votes vote down vote up
ChatsTab = createStackNavigator(
  {
    ChatsScreen: { screen: ChatsScreen },
  },
  {
    headerMode: 'none',
  },
)
Example #12
Source File: routes.js    From haven with MIT License 5 votes vote down vote up
FeedTab = createStackNavigator(
  {
    FeedScreen: { screen: FeedScreen },
  },
  {
    headerMode: 'none',
  },
)
Example #13
Source File: App.js    From hugin-mobile with GNU Affero General Public License v3.0 5 votes vote down vote up
LoginNavigator = createStackNavigator(
    {
        /* Create a wallet */
        CreateWallet: CreateWalletScreen,

        /* Set a pin for the created wallet */
        SetPin: SetPinScreen,

        /* Request the pin for an existing wallet */
        RequestPin: RequestPinScreen,

        /* Allow deleting the wallet if pin forgotten */
        ForgotPin: ForgotPinScreen,

        /* Launcing screen */
        Splash: SplashScreen,

        /* Create a wallet, import a wallet */
        WalletOption: WalletOptionScreen,

        /* Import a wallet */
        ImportWallet: ImportWalletScreen,

        /* Pick between seed or keys */
        ImportKeysOrSeed: ImportKeysOrSeedScreen,

        /* Import with a mnemonic seed */
        ImportSeed: ImportSeedScreen,

        /* Import with a set of keys */
        ImportKeys: ImportKeysScreen,

        /* Pick a month to start the wallet scanning from */
        PickMonth: PickMonthScreen,

        /* Pick a block range to start the wallet scanning from */
        PickBlockHeight: PickBlockHeightScreen,

        /* Pick a specific height to start the wallet scanning from */
        PickExactBlockHeight: PickExactBlockHeightScreen,

        /* Explain fee, I'm not responsible for anything, etc */
        Disclaimer: DisclaimerScreen,

        /* Request authentication via fingerprint, touchid, etc */
        RequestHardwareAuth: RequestHardwareAuthScreen,

        /* Whether we should use pin, fingerprint, or no auth */
        ChooseAuthMethod: ChooseAuthMethodScreen,
    },
    {
        initialRouteName: 'Splash',
        headerLayoutPreset: 'center',
        defaultNavigationOptions: {
            headerTitleStyle: {
                fontWeight: 'bold',
                color: Themes.darkMode.primaryColour,
            },
            headerTransparent: true,
            headerTintColor: Themes.darkMode.primaryColour,
        },
    }
)
Example #14
Source File: routes.js    From haven with MIT License 4 votes vote down vote up
AppNavigator = createStackNavigator(
  {
    MainNav: { screen: MainTab },

    Listing: { screen: Listing },

    ShippingOptions: { screen: ShippingOptions },
    AddShippingMethod: { screen: AddShippingMethod },
    ExternalStore: { screen: ExternalStoreScreen },
    MyStore: { screen: StoreScreen },
    ExternalFollowings: { screen: Followings },
    ExternalFollowers: { screen: Followers },
    Feed: { screen: FeedScreen },
    FeedDetail: { screen: FeedDetail },
    StoreRatings: { screen: StoreRatingsScreen },
    ProductRatings: { screen: ProductRatingsScreen },

    CreateListing: { screen: CreateListing },
    EditListing: { screen: EditListing },
    AddListingCoupon: { screen: AddListingCoupon },
    TagEditor: { screen: TagEditor },
    ListingAdvancedOptions: { screen: ListingAdvancedOptions },
    AdvancedDetails: { screen: ListingAdvancedDetails },
    CustomOptions: { screen: CustomOptions },
    EditVariants: { screen: EditVariants },
    EditInventory: { screen: EditInventory },

    Settings: { screen: SettingsStack },

    ChatDetail: { screen: ChatDetail },
    NewChat: { screen: NewChat },

    NewFeed: { screen: NewFeed },

    SearchResult: { screen: SearchResult },
    SearchFilter: { screen: SearchFilter },

    WishList: { screen: WishList },

    Wallet: { screen: Wallet },
    Transactions: { screen: Transactions },
    CryptoBalance: { screen: CryptoBalance },
    SendMoney: { screen: SendMoney },
    ReceiveMoney: { screen: ReceiveMoney },
    PaymentSuccess: { screen: PaymentSuccess },

    Orders: { screen: Orders, header: null },
    OrderDetails: { screen: OrderDetails, header: null },
    ModeratorDetails: { screen: ModeratorDetails },

    Categories: { screen: Categories },
    CategoryOverview: { screen: CategoryOverview },
    CategoryResult: { screen: CategoryResult },
    QueryResult: { screen: QueryResult },
    SubCategories: { screen: SubCategories },

    ProfileSettings: { screen: ProfileSettings },

    Followings: { screen: Followings },
    Followers: { screen: Followers },

    Notifications: { screen: Notifications },

    EditShippingAddress: { screen: EditShippingAddress },

    // Checkout flow
    CheckoutOption: { screen: CheckoutOption },
    CheckoutListing: { screen: CheckoutListing },
    CheckoutShippingAddress: { screen: ShippingAddress },
    CheckoutReceiveMoney: { screen: ReceiveMoney },
    PaymentMethod: { screen: PaymentMethod },
    CheckoutModerators: { screen: CheckoutModerators },
    CheckoutModeratorDetails: { screen: ModeratorDetails },
    PurchaseState: { screen: PurchaseState },
    ExternalPay: { screen: ExternalPay },
    ExternalPaySuccess: { screen: ExternalPaySuccess },
    Hashtag: { screen: Hashtag },
  },
  {
    cardStyle: {
      shadowColor: 'transparent',
    },
    headerMode: 'none',
    transitionConfig: () => ({
      screenInterpolator: (sceneProps) => {
        const { routeName, params } = sceneProps.scene.route;
        if (routeName === 'SearchResult') {
          return null;
        } else if (routeName === 'CategoryResult' && params.searchAutoFocus) {
          return null;
        } else {
          return StackViewStyleInterpolator.forHorizontal(sceneProps);
        }
      },
    }),
  },
)