-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
42 lines (37 loc) · 1.09 KB
/
Copy pathApp.tsx
File metadata and controls
42 lines (37 loc) · 1.09 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
import React, { useState } from 'react';
import * as Font from 'expo-font';
import { ScrollView, View, StyleSheet } from 'react-native';
import { RText, RHeadingText } from './rapido-modules/src/components/atoms';
import { enableScreens } from 'react-native-screens';
import { AppLoading } from 'expo';
import Constants from './rapido-modules/src/commons/constants/index';
enableScreens()
const fetchFonts = () => {
return Font.loadAsync(Constants.FONTS);
};
export default function App() {
const [fontLoaded, setFontLoaded] = useState(false);
if (!fontLoaded) {
return (
<AppLoading
startAsync={fetchFonts}
onFinish={() => setFontLoaded(true)}
/>
);
}
return (
<ScrollView>
<View style={styles.screen}>
<RHeadingText>Rapidobuild</RHeadingText>
<RText>Modules</RText>
</View>
</ScrollView>
);
}
const styles = StyleSheet.create({
screen: {
marginTop: 30,
justifyContent: 'center',
alignItems: 'center'
}
})