From 5ff7cab4bd36337b2c86e3d4915a6fc3ceef1ddb Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 20 Apr 2021 17:10:33 -0400 Subject: linted --- src/screens/profile/CaptionScreen.tsx | 12 +++++++++--- src/screens/profile/FriendsListScreen.tsx | 14 ++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/screens/profile') diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 998897e2..c039b8cb 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -48,8 +48,8 @@ const CaptionScreen: React.FC = ({route, navigation}) => { const [caption, setCaption] = useState(''); const [loading, setLoading] = useState(false); - const handleCaptionUpdate = (caption: string) => { - setCaption(caption); + const handleCaptionUpdate = (newCaption: string) => { + setCaption(newCaption); }; const navigateToProfile = () => { @@ -62,6 +62,9 @@ const CaptionScreen: React.FC = ({route, navigation}) => { const handleShare = async () => { setLoading(true); + if (!image.filename) { + return; + } postMoment(image.filename, image.path, caption, title, userId).then( (data) => { setLoading(false); @@ -87,7 +90,7 @@ const CaptionScreen: React.FC = ({route, navigation}) => { + style={styles.flex}>