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/onboarding/WaitlistSuccessScreen.tsx | 6 +++--- src/screens/profile/CaptionScreen.tsx | 12 +++++++++--- src/screens/profile/FriendsListScreen.tsx | 14 ++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/screens') diff --git a/src/screens/onboarding/WaitlistSuccessScreen.tsx b/src/screens/onboarding/WaitlistSuccessScreen.tsx index 1f603e3a..f21672f1 100644 --- a/src/screens/onboarding/WaitlistSuccessScreen.tsx +++ b/src/screens/onboarding/WaitlistSuccessScreen.tsx @@ -10,12 +10,12 @@ import { TouchableOpacity, View, } from 'react-native'; -import {ArrowButton, Background, SubmitButton} from '../../components'; +import CelebrationLogo from '../../assets/icons/celebration-logo.svg'; +import {ArrowButton, Background} from '../../components'; +import {TAGG_WEBSITE} from '../../constants'; import {OnboardingStackParams} from '../../routes'; import {BackgroundGradientType} from '../../types'; -import CelebrationLogo from '../../assets/icons/celebration-logo.svg'; import {SCREEN_HEIGHT} from '../../utils'; -import {TAGG_WEBSITE} from '../../constants'; type WaitlistSuccessScreenProp = StackNavigationProp< OnboardingStackParams, 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}>