File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ const App = () => {
2323 mediaType: ' photo' ,
2424 quality: 0.7 ,
2525 },
26- (response ) => {
27- if (response .base64 ) {
26+ ({ assets }) => {
27+ const response = assets ?.[0 ]
28+
29+ if (response ?.base64 ) {
2830 const imageMessage: MessageType .Image = {
2931 authorId: userId ,
3032 height: response .height ,
@@ -268,8 +270,10 @@ const App = () => {
268270 mediaType: ' photo' ,
269271 quality: 0.7 ,
270272 },
271- (response ) => {
272- if (response .base64 ) {
273+ ({ assets }) => {
274+ const response = assets ?.[0 ]
275+
276+ if (response ?.base64 ) {
273277 const imageMessage: MessageType .Image = {
274278 authorId: userId ,
275279 height: response .height ,
Original file line number Diff line number Diff line change 1919 "react-native-document-picker" : " ^5.0.4" ,
2020 "react-native-file-viewer" : " ^2.1.4" ,
2121 "react-native-get-random-values" : " ^1.7.0" ,
22- "react-native-image-picker" : " ^3.8.0 " ,
22+ "react-native-image-picker" : " ^4.0.3 " ,
2323 "react-native-safe-area-context" : " ^3.2.0" ,
2424 "uuid" : " ^8.3.2"
2525 },
2828 "@babel/runtime" : " ^7.14.0" ,
2929 "@react-native-community/eslint-config" : " ^2.0.0" ,
3030 "@types/jest" : " ^26.0.23" ,
31- "@types/react-native" : " ^0.64.5 " ,
31+ "@types/react-native" : " ^0.64.8 " ,
3232 "@types/react-test-renderer" : " ^17.0.1" ,
3333 "@types/uuid" : " ^8.3.0" ,
3434 "babel-jest" : " ^26.6.3" ,
3838 "jest" : " ^26.6.3" ,
3939 "metro-react-native-babel-preset" : " ^0.66.0" ,
4040 "react-test-renderer" : " ^17.0.2" ,
41- "typescript" : " ^4.2.4 "
41+ "typescript" : " ^4.3.2 "
4242 },
4343 "resolutions" : {
4444 "@types/react" : " ^17"
Original file line number Diff line number Diff line change @@ -74,8 +74,10 @@ const App = () => {
7474 mediaType : 'photo' ,
7575 quality : 0.7 ,
7676 } ,
77- ( response ) => {
78- if ( response . base64 ) {
77+ ( { assets } ) => {
78+ const response = assets ?. [ 0 ]
79+
80+ if ( response ?. base64 ) {
7981 const imageMessage : MessageType . Image = {
8082 authorId : userId ,
8183 height : response . height ,
You can’t perform that action at this time.
0 commit comments