Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* Welcome to the main entry point of the app.
*
*/
import "./i18n"
import * as React from "react"
import { Provider } from "react-redux"
import { AppRegistry, DeviceEventEmitter, StatusBar, View, ViewStyle } from "react-native"
import { RootNavigator } from "./navigation/root-navigator"
import { createAppContainer } from "react-navigation"
import configureStore from "./store"
import { PersistGate } from "redux-persist/integration/react"
import Toast from "react-native-easy-toast"
const AppContainer = createAppContainer(RootNavigator)
const { persistor, store } = configureStore
interface AppState {}
/**
* This is the root component of our app.
*/
export class App extends React.Component<{}, AppState> {
listener
toastRef
componentDidMount() {
console.disableYellowBox = true // TODO: Comment this line when preparing for a release
this.listener = DeviceEventEmitter.addListener("showToast", inner => {
this.toastRef.show(inner)
})
marginBottom: 20
}
})
},
activeTintColor: '#000',
inactiveTintColor: '#d1cece',
upperCaseLabel: false,
showLabel: false,
showIcon: true,
},
// defaultNavigationOptions: {
// header: null
// }
});
export default createAppContainer(TabNavigation);
// eslint-disable-next-line
import React from 'react'
import { createAppContainer, createSwitchNavigator } from "react-navigation";
import AuthLoadingScreen from "../screens/AuthLoadingScreen";
import MainTabNavigator from "./MainTabNavigator";
export default createAppContainer(
createSwitchNavigator(
{
AuthLoading: AuthLoadingScreen,
Main: MainTabNavigator
},
{
initialRouteName: "AuthLoading"
}
)
);
const navigator = createStackNavigator(
{
Login: LoginScreen,
Home: HomeScreen,
Chat: ChatScreen,
Group: GroupChatScreen,
Video: VideoPlayer,
Block: BlockedUsers,
Image: ImageViewer,
},
{
initialRouteName: 'Login'
}
);
const AppContainer = createAppContainer(navigator)
export default class App extends Component {
render() {
console.disableYellowBox = true;
return (
{
NavigationService.setTopLevelNavigator(navigatorRef);
}}
/>
);
}
}
header: null,
},
},
LNDCreateInvoice: {
screen: LNDCreateInvoiceStackNavigator,
navigationOptions: {
header: null,
},
},
},
{
mode: 'modal',
},
);
export default createAppContainer(MainBottomTabs);
import React from "react";
import { RootStack } from "./components";
import { createAppContainer } from "react-navigation";
export default createAppContainer(RootStack);
stagger: StaggerExampleScreen,
easings: EasingsExampleScreen,
style: StyleExampleScreen,
svg: SvgExampleScreen,
repeat: RepeatExampleScreen,
dragging: DraggingExampleScreen,
navigation: NavigationExampleScreen,
interactions: InteractionsExampleScreen,
driver: DriverExampleScreen,
children: ChildExampleScreen,
appStore: AppStoreExampleScreen,
list: ListExampleScreen,
flutter: FlutterExampleScreen,
});
const AppNavigator = createAppContainer(Stack);
export default () => {
return (
);
};
render () {
const { theme } = this.props
const statusBar = {
backgroundColor: theme.themeColor,
barStyle: 'light-content'
}
const navigationBar =
const TabNavigator = createAppContainer(createMaterialTopTabNavigator(
{
'Popular': {
screen: props => ,
navigationOptions: {
title: '最热'
}
},
'Trending': {
screen: props => ,
navigationOptions: {
title: '趋势'
}
}
},
{
tabBarOptions: {
header: null
})
},
Explore: { screen: ExploreScreen },
Music: { screen: MusicScreen },
Download: { screen: DownloadScreen },
Profile: { screen: ProfileScreen }
}, {
initialRouteName: 'MainScreen',
navigationOptions: {
headerStyle: styles.header
}
})
export default createAppContainer(createSwitchNavigator(
{
AuthLoading: SplashScreen,
App: AppStack,
Auth: AuthStack,
},
{
initialRouteName: 'AuthLoading',
}
));
Issue: IssueScreen,
Front: FrontScreen,
Article: ArticleScreen,
Settings: SettingsScreen,
Links: LinksScreen,
},
{
defaultNavigationOptions: {
headerStyle: {
backgroundColor: '#052962',
},
headerTintColor: '#fff',
},
}
);
export default createAppContainer(HomeStack);