Skip to content

Commit abadbb4

Browse files
committed
feat(app): change app component
1 parent a9d1465 commit abadbb4

File tree

6 files changed

+355
-107
lines changed

6 files changed

+355
-107
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
root: true,
33
extends: '@react-native-community',
4-
};
4+
}

.prettierrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module.exports = {
2-
bracketSpacing: false,
2+
printWidth: 120,
3+
tabWidth: 2,
34
jsxBracketSameLine: true,
45
singleQuote: true,
56
trailingComma: 'all',
7+
quoteProps: 'preserve',
8+
semi: false,
69
};

App.js

Lines changed: 10 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,32 @@
1-
/**
2-
* Sample React Native App
3-
* https://github.com/facebook/react-native
4-
*
5-
* @format
6-
* @flow strict-local
7-
*/
8-
9-
import React from 'react';
1+
import React from 'react'
102
import {
113
SafeAreaView,
124
StyleSheet,
135
ScrollView,
146
View,
157
Text,
168
StatusBar,
17-
} from 'react-native';
18-
19-
import {
20-
Header,
21-
LearnMoreLinks,
22-
Colors,
23-
DebugInstructions,
24-
ReloadInstructions,
25-
} from 'react-native/Libraries/NewAppScreen';
9+
} from 'react-native'
2610

27-
const App: () => React$Node = () => {
11+
function App() {
2812
return (
2913
<>
3014
<StatusBar barStyle="dark-content" />
3115
<SafeAreaView>
3216
<ScrollView
3317
contentInsetAdjustmentBehavior="automatic"
3418
style={styles.scrollView}>
35-
<Header />
36-
{global.HermesInternal == null ? null : (
37-
<View style={styles.engine}>
38-
<Text style={styles.footer}>Engine: Hermes</Text>
39-
</View>
40-
)}
41-
<View style={styles.body}>
42-
<View style={styles.sectionContainer}>
43-
<Text style={styles.sectionTitle}>Step One</Text>
44-
<Text style={styles.sectionDescription}>
45-
Edit <Text style={styles.highlight}>App.js</Text> to change this
46-
screen and then come back to see your edits.
47-
</Text>
48-
</View>
49-
<View style={styles.sectionContainer}>
50-
<Text style={styles.sectionTitle}>See Your Changes</Text>
51-
<Text style={styles.sectionDescription}>
52-
<ReloadInstructions />
53-
</Text>
54-
</View>
55-
<View style={styles.sectionContainer}>
56-
<Text style={styles.sectionTitle}>Debug</Text>
57-
<Text style={styles.sectionDescription}>
58-
<DebugInstructions />
59-
</Text>
60-
</View>
61-
<View style={styles.sectionContainer}>
62-
<Text style={styles.sectionTitle}>Learn More</Text>
63-
<Text style={styles.sectionDescription}>
64-
Read the docs to discover what to do next:
65-
</Text>
66-
</View>
67-
<LearnMoreLinks />
68-
</View>
19+
<Text>App</Text>
6920
</ScrollView>
7021
</SafeAreaView>
7122
</>
72-
);
73-
};
23+
)
24+
}
7425

7526
const styles = StyleSheet.create({
7627
scrollView: {
77-
backgroundColor: Colors.lighter,
78-
},
79-
engine: {
80-
position: 'absolute',
81-
right: 0,
82-
},
83-
body: {
84-
backgroundColor: Colors.white,
85-
},
86-
sectionContainer: {
87-
marginTop: 32,
88-
paddingHorizontal: 24,
89-
},
90-
sectionTitle: {
91-
fontSize: 24,
92-
fontWeight: '600',
93-
color: Colors.black,
94-
},
95-
sectionDescription: {
96-
marginTop: 8,
97-
fontSize: 18,
98-
fontWeight: '400',
99-
color: Colors.dark,
100-
},
101-
highlight: {
102-
fontWeight: '700',
103-
},
104-
footer: {
105-
color: Colors.dark,
106-
fontSize: 12,
107-
fontWeight: '600',
108-
padding: 4,
109-
paddingRight: 12,
110-
textAlign: 'right',
111-
},
112-
});
28+
backgroundColor: '#ffffff',
29+
}
30+
})
11331

114-
export default App;
32+
export default App

index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/**
2-
* @format
3-
*/
4-
5-
import {AppRegistry} from 'react-native';
1+
import { AppRegistry } from 'react-native';
62
import App from './App';
7-
import {name as appName} from './app.json';
3+
import { name as appName } from './app.json';
84

95
AppRegistry.registerComponent(appName, () => App);

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@
1010
"lint": "eslint ."
1111
},
1212
"dependencies": {
13+
"@react-navigation/native": "^5.8.10",
14+
"@react-navigation/stack": "^5.12.8",
15+
"axios": "^0.21.1",
1316
"dotenv": "^8.2.0",
1417
"express": "^4.17.1",
1518
"faker": "^5.1.0",
1619
"react": "16.13.1",
1720
"react-native": "0.63.4",
18-
"twilio": "^3.54.1"
21+
"react-native-gifted-chat": "^0.16.3",
22+
"twilio": "^3.54.1",
23+
"twilio-chat": "^4.1.0"
1924
},
2025
"devDependencies": {
2126
"@babel/core": "^7.12.10",

0 commit comments

Comments
 (0)