aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-06-09 16:59:40 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-06-09 16:59:40 -0700
commit6fcfaa41f3a5ec6ec7bbd28d98be865b24cfc6ac (patch)
treee21e50a9fb343b41810a2ab697313eda8a6c0a48
parent117996a44ffdb7c9c517ab58ad8ea5cbe0dd01f1 (diff)
Navigate back on cancel while editing
-rw-r--r--src/screens/profile/CaptionScreen.tsx4
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'}