diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-06-09 16:59:40 -0700 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-06-09 16:59:40 -0700 |
commit | 6fcfaa41f3a5ec6ec7bbd28d98be865b24cfc6ac (patch) | |
tree | e21e50a9fb343b41810a2ab697313eda8a6c0a48 | |
parent | 117996a44ffdb7c9c517ab58ad8ea5cbe0dd01f1 (diff) |
Navigate back on cancel while editing
-rw-r--r-- | src/screens/profile/CaptionScreen.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 949b61fd..d4ba6b23 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -169,7 +169,9 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => { <Button title="Cancel" buttonStyle={styles.button} - onPress={() => navigateToProfile()} + onPress={() => + moment ? navigation.goBack() : navigateToProfile() + } /> <Button title={moment ? 'Done' : 'Share'} |