-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
60 lines (49 loc) · 1.47 KB
/
App.js
File metadata and controls
60 lines (49 loc) · 1.47 KB
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
//
// App.js
// CSSS Design-21.09.25
//
// Created by [Author].
// Copyright © 2018 [Company]. All rights reserved.
//
import * as Font from "expo-font"
import Home from "./App/Home/Home"
import Messages from "./App/Messages/Messages"
import Post1 from "./App/Post1/Post1"
import Post2 from "./App/Post2/Post2"
import React from "react"
import Setting from "./App/Setting/Setting"
import { AppLoading, DangerZone } from "expo"
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
const Stack = createStackNavigator();
export default class App extends React.Component {
constructor(props) {
super(props)
this.state = {
fontsReady: false,
}
}
componentDidMount() {
this.initProjectFonts()
}
async initProjectFonts() {
await Font.loadAsync({
"PingFangSC-Regular": require("./assets/fonts/PingFang.ttf"),
"Helvetica": require("./assets/fonts/Helvetica.ttf"),
})
this.setState({
fontsReady: true,
})
}
render() {
return(
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="Home" component={Home}/>
<Stack.Screen name="Messages" component={Messages} />
<Stack.Screen name="Setting" component={Setting} />
</Stack.Navigator>
</NavigationContainer>
);
}
}