diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-06-23 15:21:14 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-06-23 15:21:14 -0400 |
| commit | 545caa8c32e383551b1f1d5de61a300bc39100ff (patch) | |
| tree | eb15f73f0a3956ed4a46869728908590a15efe51 /src/screens/profile/CaptionScreen.tsx | |
| parent | cd5863264d0fe954e63d8cc93fc4ee6ab509f49b (diff) | |
Cleanup code, Update route params for Caption Screen
Diffstat (limited to 'src/screens/profile/CaptionScreen.tsx')
| -rw-r--r-- | src/screens/profile/CaptionScreen.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 9e1b4674..bb02494d 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -51,7 +51,7 @@ interface CaptionScreenProps { } const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => { - const {title, image, screenType, selectedTags, moment} = route.params; + const {title, media, screenType, selectedTags, moment} = route.params; const { user: {userId}, } = useSelector((state: RootState) => state.user); @@ -120,12 +120,12 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => { const handleShare = async () => { setLoading(true); - if (!image?.filename || !title) { + if (!media || !title) { return; } const momentResponse = await postMoment( - image.filename, - image.path, + media.filename, + media.uri, caption, title, userId, |
