-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
97 lines (82 loc) · 2.62 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import React, { Component } from "react";
import { Platform, StyleSheet, View, StatusBar } from "react-native";
import { AppLoading } from "expo";
import { createAppContainer } from 'react-navigation';
// import { createStackNavigator } from 'react-navigation-stack';
import Sockets from 'react-native-sockets';
import getTheme from "./native-base-theme/components";
import material from "./native-base-theme/variables/material";
import { StyleProvider } from "native-base";
import AppNavigator from './AppNavigator';
import SignupView from "./components/signup/mainSignup";
import ChatView from "./components/chatscreen/mainChat";
import MsgView from "./components/msgscreen/mainMsg";
import SearchScreen from "./components/search/mainSearch";
import * as Font from "expo-font";
import { Ionicons } from "@expo/vector-icons";
var SQLite = require('react-native-sqlite-storage')
const instructions = Platform.select({
ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
android:
"Double tap R on your keyboard to reload,\n" +
"Shake or press menu button for dev menu"
});
let port = 9500;
Sockets.startServer(port);
export default class App extends Component {
constructor(props) {
super(props);
this.state = {
isReady: false
};
}
async componentDidMount() {
await Font.loadAsync({
Roboto: require("native-base/Fonts/Roboto.ttf"),
Roboto_medium: require("native-base/Fonts/Roboto_medium.ttf"),
...Ionicons.font
});
this.setState({ isReady: true });
}
// let port = 8080;
// Sockets.startServer(port);
render() {
if (!this.state.isReady) {
return <AppLoading />;
}
return (
<View style={styles.container}>
<StyleProvider style={getTheme(material)}>
{/* < SignupView /> */}
{/* <ChatView /> */}
{/* <MsgView /> */}
{/* <SearchScreen /> */}
<AppNavigator />
</StyleProvider>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
// justifyContent: "center",
// alignItems: "center",
// // backgroundColor: "#F5FCFF"
...Platform.select({
android: {
marginTop: StatusBar.currentHeight
}
})
},
welcome: {
fontSize: 20,
textAlign: "center",
margin: 10
},
instructions: {
textAlign: "center",
color: "#333333",
marginBottom: 5
}
});