Skip to content

Commit e13e619

Browse files
committed
feat(app): create screens
1 parent abadbb4 commit e13e619

File tree

9 files changed

+167
-41
lines changed

9 files changed

+167
-41
lines changed

App.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

index.js

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

5-
AppRegistry.registerComponent(appName, () => App);
5+
AppRegistry.registerComponent(appName, () => App)

ios/Podfile.lock

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ PODS:
236236
- React-cxxreact (= 0.63.4)
237237
- React-jsi (= 0.63.4)
238238
- React-jsinspector (0.63.4)
239+
- react-native-safe-area-context (3.1.9):
240+
- React-Core
239241
- React-RCTActionSheet (0.63.4):
240242
- React-Core/RCTActionSheetHeaders (= 0.63.4)
241243
- React-RCTAnimation (0.63.4):
@@ -296,6 +298,14 @@ PODS:
296298
- React-Core (= 0.63.4)
297299
- React-cxxreact (= 0.63.4)
298300
- React-jsi (= 0.63.4)
301+
- RNCMaskedView (0.1.10):
302+
- React
303+
- RNGestureHandler (1.9.0):
304+
- React-Core
305+
- RNReanimated (1.13.2):
306+
- React-Core
307+
- RNScreens (2.16.1):
308+
- React-Core
299309
- Yoga (1.14.0)
300310
- YogaKit (1.18.1):
301311
- Yoga (~> 1.14)
@@ -337,6 +347,7 @@ DEPENDENCIES:
337347
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
338348
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
339349
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
350+
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
340351
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
341352
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
342353
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
@@ -347,6 +358,10 @@ DEPENDENCIES:
347358
- React-RCTText (from `../node_modules/react-native/Libraries/Text`)
348359
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
349360
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
361+
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
362+
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
363+
- RNReanimated (from `../node_modules/react-native-reanimated`)
364+
- RNScreens (from `../node_modules/react-native-screens`)
350365
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
351366

352367
SPEC REPOS:
@@ -395,6 +410,8 @@ EXTERNAL SOURCES:
395410
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
396411
React-jsinspector:
397412
:path: "../node_modules/react-native/ReactCommon/jsinspector"
413+
react-native-safe-area-context:
414+
:path: "../node_modules/react-native-safe-area-context"
398415
React-RCTActionSheet:
399416
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
400417
React-RCTAnimation:
@@ -415,6 +432,14 @@ EXTERNAL SOURCES:
415432
:path: "../node_modules/react-native/Libraries/Vibration"
416433
ReactCommon:
417434
:path: "../node_modules/react-native/ReactCommon"
435+
RNCMaskedView:
436+
:path: "../node_modules/@react-native-community/masked-view"
437+
RNGestureHandler:
438+
:path: "../node_modules/react-native-gesture-handler"
439+
RNReanimated:
440+
:path: "../node_modules/react-native-reanimated"
441+
RNScreens:
442+
:path: "../node_modules/react-native-screens"
418443
Yoga:
419444
:path: "../node_modules/react-native/ReactCommon/yoga"
420445

@@ -445,6 +470,7 @@ SPEC CHECKSUMS:
445470
React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31
446471
React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949
447472
React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a
473+
react-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94
448474
React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336
449475
React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b
450476
React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0
@@ -455,6 +481,10 @@ SPEC CHECKSUMS:
455481
React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c
456482
React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d
457483
ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b
484+
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
485+
RNGestureHandler: 9b7e605a741412e20e13c512738a31bd1611759b
486+
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
487+
RNScreens: 45c457af3d2ee9e08fc01e70da87e653d46b1198
458488
Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6
459489
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
460490

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"lint": "eslint ."
1111
},
1212
"dependencies": {
13+
"@react-native-community/masked-view": "^0.1.10",
1314
"@react-navigation/native": "^5.8.10",
1415
"@react-navigation/stack": "^5.12.8",
1516
"axios": "^0.21.1",
@@ -18,7 +19,11 @@
1819
"faker": "^5.1.0",
1920
"react": "16.13.1",
2021
"react-native": "0.63.4",
22+
"react-native-gesture-handler": "^1.9.0",
2123
"react-native-gifted-chat": "^0.16.3",
24+
"react-native-reanimated": "^1.13.2",
25+
"react-native-safe-area-context": "^3.1.9",
26+
"react-native-screens": "^2.16.1",
2227
"twilio": "^3.54.1",
2328
"twilio-chat": "^4.1.0"
2429
},

src/app.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react'
2+
import { NavigationContainer } from '@react-navigation/native'
3+
import { createStackNavigator } from '@react-navigation/stack'
4+
5+
import { WelcomeScreen } from './screens/welcome-screen'
6+
import { ChatListScreen } from './screens/chat-list-screen'
7+
import { ChatRoomScreen } from './screens/chat-room-screen'
8+
9+
const Stack = createStackNavigator();
10+
11+
export const routes = {
12+
Welcome: 'welcome',
13+
ChatList: 'chat-list',
14+
ChatRoom: 'chat-room'
15+
}
16+
17+
export default function App() {
18+
return (
19+
<NavigationContainer>
20+
<Stack.Navigator>
21+
<Stack.Screen name={routes.Welcome} component={WelcomeScreen} />
22+
<Stack.Screen name={routes.ChatList} component={ChatListScreen} />
23+
<Stack.Screen name={routes.ChatRoom} component={ChatRoomScreen} />
24+
</Stack.Navigator>
25+
</NavigationContainer>
26+
)
27+
}
28+

src/screens/chat-list-screen.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react'
2+
import { View, Text } from 'react-native'
3+
4+
export function ChatListScreen() {
5+
return (
6+
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
7+
<Text>Chat List Screen</Text>
8+
</View>
9+
);
10+
}

src/screens/chat-room-screen.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react'
2+
import { View, Text } from 'react-native'
3+
4+
export function ChatRoomScreen() {
5+
return (
6+
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
7+
<Text>Chat Room Screen</Text>
8+
</View>
9+
);
10+
}

src/screens/welcome-screen.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react'
2+
import { View, Text } from 'react-native'
3+
4+
export function WelcomeScreen() {
5+
return (
6+
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
7+
<Text>Welcome Screen</Text>
8+
</View>
9+
);
10+
}

yarn.lock

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,13 @@
716716
exec-sh "^0.3.2"
717717
minimist "^1.2.0"
718718

719+
"@egjs/hammerjs@^2.0.17":
720+
version "2.0.17"
721+
resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124"
722+
integrity sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==
723+
dependencies:
724+
"@types/hammerjs" "^2.0.36"
725+
719726
"@eslint/eslintrc@^0.2.2":
720727
version "0.2.2"
721728
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz"
@@ -1158,6 +1165,11 @@
11581165
resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.1.0.tgz"
11591166
integrity sha512-W/J0fNYVO01tioHjvYWQ9m6RgndVtbElzYozBq1ZPrHO/iCzlqoySHl4gO/fpCl9QEFjvJfjPgtPMTMlsoq5DQ==
11601167

1168+
"@react-native-community/masked-view@^0.1.10":
1169+
version "0.1.10"
1170+
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz#5dda643e19e587793bc2034dd9bf7398ad43d401"
1171+
integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ==
1172+
11611173
"@react-navigation/core@^5.14.4":
11621174
version "5.14.4"
11631175
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.14.4.tgz#f63a2cd214bddbd25e1181f9335c32dfc3b6460f"
@@ -1252,6 +1264,11 @@
12521264
dependencies:
12531265
"@types/node" "*"
12541266

1267+
"@types/hammerjs@^2.0.36":
1268+
version "2.0.36"
1269+
resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.36.tgz#17ce0a235e9ffbcdcdf5095646b374c2bf615a4c"
1270+
integrity sha512-7TUK/k2/QGpEAv/BCwSHlYu3NXZhQ9ZwBYpzr9tjlPIL2C5BeGhH3DmVavRx3ZNyELX5TLC91JTz/cen6AAtIQ==
1271+
12551272
"@types/hoist-non-react-statics@^3.3.1":
12561273
version "3.3.1"
12571274
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
@@ -2369,6 +2386,13 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0:
23692386
js-yaml "^3.13.1"
23702387
parse-json "^4.0.0"
23712388

2389+
cross-fetch@^3.0.4:
2390+
version "3.0.6"
2391+
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c"
2392+
integrity sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ==
2393+
dependencies:
2394+
node-fetch "2.6.1"
2395+
23722396
cross-spawn@^5.1.0:
23732397
version "5.1.0"
23742398
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz"
@@ -3177,6 +3201,19 @@ fbjs@^1.0.0:
31773201
setimmediate "^1.0.5"
31783202
ua-parser-js "^0.7.18"
31793203

3204+
fbjs@^3.0.0:
3205+
version "3.0.0"
3206+
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.0.tgz#0907067fb3f57a78f45d95f1eacffcacd623c165"
3207+
integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg==
3208+
dependencies:
3209+
cross-fetch "^3.0.4"
3210+
fbjs-css-vars "^1.0.0"
3211+
loose-envify "^1.0.0"
3212+
object-assign "^4.1.0"
3213+
promise "^7.1.1"
3214+
setimmediate "^1.0.5"
3215+
ua-parser-js "^0.7.18"
3216+
31803217
figures@^2.0.0:
31813218
version "2.0.0"
31823219
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz"
@@ -5441,6 +5478,11 @@ nocache@^2.1.0:
54415478
resolved "https://registry.yarnpkg.com/nocache/-/nocache-2.1.0.tgz"
54425479
integrity sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==
54435480

5481+
[email protected], node-fetch@^2.2.0, node-fetch@^2.6.0:
5482+
version "2.6.1"
5483+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz"
5484+
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
5485+
54445486
node-fetch@^1.0.1:
54455487
version "1.7.3"
54465488
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz"
@@ -5449,11 +5491,6 @@ node-fetch@^1.0.1:
54495491
encoding "^0.1.11"
54505492
is-stream "^1.0.1"
54515493

5452-
node-fetch@^2.2.0, node-fetch@^2.6.0:
5453-
version "2.6.1"
5454-
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz"
5455-
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
5456-
54575494
node-int64@^0.4.0:
54585495
version "0.4.0"
54595496
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz"
@@ -6098,6 +6135,17 @@ react-native-communications@^2.2.1:
60986135
resolved "https://registry.yarnpkg.com/react-native-communications/-/react-native-communications-2.2.1.tgz#7883b56b20a002eeb790c113f8616ea8692ca795"
60996136
integrity sha1-eIO1ayCgAu63kMET+GFuqGksp5U=
61006137

6138+
react-native-gesture-handler@^1.9.0:
6139+
version "1.9.0"
6140+
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.9.0.tgz#e441b1c0277c3fd4ca3e5c58fdd681e2f0ceddf0"
6141+
integrity sha512-fkkNeWDBzDdwDxDcxtYbrb9T1g0PLgT1AxBs2iO/p7uEbDbC6mIoL/NzuOnKNEBHcd0lpLoJuNmIfdmucEON5g==
6142+
dependencies:
6143+
"@egjs/hammerjs" "^2.0.17"
6144+
fbjs "^3.0.0"
6145+
hoist-non-react-statics "^3.3.0"
6146+
invariant "^2.2.4"
6147+
prop-types "^15.7.2"
6148+
61016149
react-native-gifted-chat@^0.16.3:
61026150
version "0.16.3"
61036151
resolved "https://registry.yarnpkg.com/react-native-gifted-chat/-/react-native-gifted-chat-0.16.3.tgz#eea98290bfcf72b36d2aaf002edddd90353aa6ec"
@@ -6132,6 +6180,23 @@ [email protected]:
61326180
dependencies:
61336181
prop-types "^15.7.x"
61346182

6183+
react-native-reanimated@^1.13.2:
6184+
version "1.13.2"
6185+
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-1.13.2.tgz#1ae5457b24b4913d173a5a064bb28eae7783d293"
6186+
integrity sha512-O+WhgxSjOIzcVdAAvx+h2DY331Ek1knKlaq+jsNLpC1fhRy9XTdOObovgob/aF2ve9uJfPEawCx8381g/tUJZQ==
6187+
dependencies:
6188+
fbjs "^1.0.0"
6189+
6190+
react-native-safe-area-context@^3.1.9:
6191+
version "3.1.9"
6192+
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.1.9.tgz#48864ea976b0fa57142a2cc523e1fd3314e7247e"
6193+
integrity sha512-wmcGbdyE/vBSL5IjDPReoJUEqxkZsywZw5gPwsVUV1NBpw5eTIdnL6Y0uNKHE25Z661moxPHQz6kwAkYQyorxA==
6194+
6195+
react-native-screens@^2.16.1:
6196+
version "2.16.1"
6197+
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.16.1.tgz#b105a127378d90018a46daf0c2f6518fca60c06f"
6198+
integrity sha512-WZ7m0sBDVaHbBnlHxwQnUlI6KNfQKHq+Unfw+VBuAlnSXvT+aw6Bb/K2bUlHzBgvrPjwY3Spc7ZERFuTwRLLwg==
6199+
61356200
react-native-typing-animation@^0.1.7:
61366201
version "0.1.7"
61376202
resolved "https://registry.yarnpkg.com/react-native-typing-animation/-/react-native-typing-animation-0.1.7.tgz#8f2cf08d9400ae543a110292eb7d71523dda5528"

0 commit comments

Comments
 (0)