File tree 6 files changed +375
-354
lines changed
6 files changed +375
-354
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ const App = () => {
23
23
mediaType: ' photo' ,
24
24
quality: 0.7 ,
25
25
},
26
- (response ) => {
27
- if (response .base64 ) {
26
+ ({ assets }) => {
27
+ const response = assets ?.[0 ]
28
+
29
+ if (response ?.base64 ) {
28
30
const imageMessage: MessageType .Image = {
29
31
authorId: userId ,
30
32
height: response .height ,
@@ -268,8 +270,10 @@ const App = () => {
268
270
mediaType: ' photo' ,
269
271
quality: 0.7 ,
270
272
},
271
- (response ) => {
272
- if (response .base64 ) {
273
+ ({ assets }) => {
274
+ const response = assets ?.[0 ]
275
+
276
+ if (response ?.base64 ) {
273
277
const imageMessage: MessageType .Image = {
274
278
authorId: userId ,
275
279
height: response .height ,
Original file line number Diff line number Diff line change 19
19
"react-native-document-picker" : " ^5.0.4" ,
20
20
"react-native-file-viewer" : " ^2.1.4" ,
21
21
"react-native-get-random-values" : " ^1.7.0" ,
22
- "react-native-image-picker" : " ^3.8.0 " ,
22
+ "react-native-image-picker" : " ^4.0.3 " ,
23
23
"react-native-safe-area-context" : " ^3.2.0" ,
24
24
"uuid" : " ^8.3.2"
25
25
},
28
28
"@babel/runtime" : " ^7.14.0" ,
29
29
"@react-native-community/eslint-config" : " ^2.0.0" ,
30
30
"@types/jest" : " ^26.0.23" ,
31
- "@types/react-native" : " ^0.64.5 " ,
31
+ "@types/react-native" : " ^0.64.8 " ,
32
32
"@types/react-test-renderer" : " ^17.0.1" ,
33
33
"@types/uuid" : " ^8.3.0" ,
34
34
"babel-jest" : " ^26.6.3" ,
38
38
"jest" : " ^26.6.3" ,
39
39
"metro-react-native-babel-preset" : " ^0.66.0" ,
40
40
"react-test-renderer" : " ^17.0.2" ,
41
- "typescript" : " ^4.2.4 "
41
+ "typescript" : " ^4.3.2 "
42
42
},
43
43
"resolutions" : {
44
44
"@types/react" : " ^17"
Original file line number Diff line number Diff line change @@ -74,8 +74,10 @@ const App = () => {
74
74
mediaType : 'photo' ,
75
75
quality : 0.7 ,
76
76
} ,
77
- ( response ) => {
78
- if ( response . base64 ) {
77
+ ( { assets } ) => {
78
+ const response = assets ?. [ 0 ]
79
+
80
+ if ( response ?. base64 ) {
79
81
const imageMessage : MessageType . Image = {
80
82
authorId : userId ,
81
83
height : response . height ,
You can’t perform that action at this time.
0 commit comments