From 545caa8c32e383551b1f1d5de61a300bc39100ff Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 23 Jun 2021 15:21:14 -0400 Subject: Cleanup code, Update route params for Caption Screen --- src/components/moments/Moment.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/components') diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx index 34b2c7ea..a0f66cc5 100644 --- a/src/components/moments/Moment.tsx +++ b/src/components/moments/Moment.tsx @@ -102,11 +102,15 @@ const Moment: React.FC = ({ mediaType: 'photo', }) .then((picture) => { - if ('path' in picture) { + if (picture.path && picture.filename) { navigation.navigate('CaptionScreen', { screenType, title: title, - image: picture, + media: { + filename: picture.filename, + uri: picture.path, + type: 'image', + }, }); } }) -- cgit v1.2.3-70-g09d2