Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
];
/*
if (Platform.OS === 'android') {
tabs.push({
label: 'Collapsing',
screen: 'example.CollapsingTopBarScreen',
icon: require('../img/one.png'),
title: 'Collapsing',
});
}
*/
return tabs;
};
// this will start our app
Navigation.startTabBasedApp({
tabs: createTabs()
});
/*
import React, { Component } from 'react';
import { LoginButton, AccessToken, GraphRequest, GraphRequestManager } from 'react-native-fbsdk';
import { View, Text } from 'react-native';
import { Header, styles } from './components/common'; // Actually importing from ./components/common/index.js, but index is automattic
const user = [];
class Login extends Component {
test() {
console.log('Name: ', user.name);
startApp() {
Navigation.startTabBasedApp({
tabs: [{
screen: 'instaClone.HomeScreen', // this is a registered name for a screen
icon: icons['ios-home-outline'],
selectedIcon: icons['ios-home'],
title: 'Home',
iconInsets: { top: 6, bottom: -6 },
navigatorButtons: {
leftButtons: [
{
id: 'camera-button',
component: 'CameraButton' // This line loads our component as a nav bar button item
}
],
rightButtons: [
{
id: 'send-button',
export function startTabBasedApp(){
Navigation.startTabBasedApp({
tabs: [
{
label: 'Contacts',
screen: 'tabs.Contacts', // this is a registered name for a screen
title: 'Contacts',
icon: require('../img/contacts-inactive.png'),
selectedIcon: require('../img/contacts-active.png'), // iOS only
navigatorStyle: {
navBarHidden: true
}
},
{
label: 'Chats',
screen: 'tabs.Chats',
title: 'Chats',
icon: require('../img/chats-inactive.png'),
startApp(root) {
switch (root) {
case "login":
Navigation.startSingleScreenApp(LOGIN_CONFIG);
return;
case "after-login":
Navigation.startTabBasedApp(TAB_CONFIG);
return;
default:
console.error("Unknown app root");
}
}
export function* launchLoggedInFlow(): Generator<*, *, any> {
const isMigrationRequired = yield call(isMigration);
if (isMigrationRequired) {
Navigation.startSingleScreenApp({
screen: screen('MIGRATION_SCREEN'),
appStyle: { ...appStyle },
});
} else {
Navigation.startTabBasedApp({
tabs: [
screen('CHAT_LIST_SCREEN'),
screen('NATIONS_SCREEN'),
screen('SERVICES_SCREEN'),
],
tabsStyle: { ...tabsStyle },
appStyle: { ...appStyle },
drawer: { ...drawerStyle },
});
}
}
startApp: () => Navigation.startTabBasedApp(tabBasedAppParams)
}
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import './src/config';
import Colors from 'styles/Colors';
import { registerScreens } from './src/screens';
import { Navigation } from 'react-native-navigation';
registerScreens();
Navigation.startTabBasedApp({
tabs: [
{
label: intl('tabs_clusters'),
screen: 'cabin.ClustersIndex',
icon: require('images/target.png'),
title: intl('tabs_clusters'),
},
{
label: intl('tabs_deploy'),
screen: 'cabin.DeployIndex',
icon: require('images/upload.png'),
title: intl('tabs_deploy'),
},
{
label: intl('tabs_settings'),
screen: 'cabin.SettingsIndex',
navBarTranslucent: true,
navBarNoBorder: true,
topTabTextColor: '#FFF',
selectedTopTabIndicatorColor: '#FF2244',
selectedTopTabIndicatorHeight: 4,
selectedTopTabTextColor: '#FFF',
drawUnderTabBar: true,
drawUnderNavBar: true,
statusBarTextColorScheme: 'light',
screenBackgroundColor: '#171717',
};
Navigation.startTabBasedApp({
tabs: [{
label: 'In Theaters',
screen: IN_THEATERS_SCREEN,
icon: require('./images/icons/movie.png'),
selectedIcon: require('./images/icons/movie-filled.png'),
navigatorStyle: {
...navigatorStyle,
navBarCustomView: IN_THEATERS_TOOLBAR,
},
navigatorButtons: {
rightButtons: [{
title: 'Filter',
id: 'filter',
}],
},
}, {
static startAppLoggedIn() {
Navigation.startTabBasedApp({
tabs: [
{
label: 'Dashboard',
screen: 'testapp.LoggedIn',
title: 'Dashboard',
navigatorStyle: defaultNavigator
},
{
label: 'About',
screen: 'testapp.About',
title: 'About',
navigatorStyle: defaultNavigator
}
],
tabsStyle: defaultTabs,
animationType: Platform.OS === 'ios' ? 'slide-down' : 'fade'
import { Navigation } from 'react-native-navigation';
import { registerScreens } from './flow/screens';
import Constants from './global/Constants';
import { tabsStyle } from './global/Constants/Screens';
registerScreens();
Navigation.startTabBasedApp({
tabs: [
Constants.Screens.DASHBOARD_SCREEN,
Constants.Screens.CHAT_SCREEN,
Constants.Screens.NATIONS_SCREEN,
Constants.Screens.WALLET_SCREEN,
Constants.Screens.PROFILE_SCREEN,
],
tabsStyle,
});