App.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. *
  5. * @format
  6. * @flow
  7. */
  8. import React, { Component } from "react";
  9. import {
  10. Platform,
  11. StyleSheet,
  12. Text,
  13. View,
  14. Button,
  15. ImageBackground,
  16. Image,
  17. DeviceEventEmitter
  18. } from "react-native";
  19. import { createStackNavigator, createAppContainer } from "react-navigation";
  20. import MainActivity from "./pages/MainActivity";
  21. import SchoolAge from "./pages/components/SchoolAge";
  22. import MainPage from "./pages/components/MainPage";
  23. import SchedulePage from "./pages/components/SchedulePage";
  24. import PersonalInfo from "./pages/components/PersonalInfo";
  25. import userCenter from "./pages/userCenter";
  26. const RootNavigator = createStackNavigator(
  27. {
  28. MainActivity: { screen: MainActivity },
  29. SchoolAge: { screen: SchoolAge },
  30. MainPage: { screen: MainPage },
  31. SchedulePage: { screen: SchedulePage },
  32. PersonalInfo: { screen: PersonalInfo },
  33. userCenter: { screen: userCenter },
  34. CourseDetails: { screen: CourseDetails}
  35. },
  36. {
  37. initialRouteName: "CourseDetails",
  38. headerMode: "null"
  39. }
  40. );
  41. const App = createAppContainer(RootNavigator);
  42. export default App;
  43. // type Props = {};
  44. // export default class App extends Component<Props> {
  45. // render() {
  46. // return (
  47. // <View>
  48. // <ImageBackground
  49. // source={require("../imgs/splash.jpg")}
  50. // style={{ flex: 1, width: "100%", height: "100%" }}
  51. // />
  52. // </View>
  53. // );
  54. // }
  55. // }