From b505c851d3dfffc2f2efd12d99422ba3727ba88e Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@thetaggid.com>
Date: Mon, 14 Dec 2020 16:37:21 -0500
Subject: added icons (#139)

Co-authored-by: Ashm Walia <40498934+ashmgarv@users.noreply.github.com>
---
 src/screens/profile/EditProfile.tsx | 98 ++++++++++++++++++++++---------------
 1 file changed, 58 insertions(+), 40 deletions(-)

(limited to 'src/screens/profile/EditProfile.tsx')

diff --git a/src/screens/profile/EditProfile.tsx b/src/screens/profile/EditProfile.tsx
index 97c58177..22c83985 100644
--- a/src/screens/profile/EditProfile.tsx
+++ b/src/screens/profile/EditProfile.tsx
@@ -23,6 +23,7 @@ import {
   TaggDropDown,
   BirthDatePicker,
   TabsGradient,
+  SocialIcon,
 } from '../../components';
 import ImagePicker from 'react-native-image-crop-picker';
 import {
@@ -70,7 +71,6 @@ const EditProfile: React.FC<EditProfileProps> = ({route, navigation}) => {
     if (needsUpdate) {
       dispatch(loadUserData({userId, username}));
     }
-
   }, [dispatch, needsUpdate, userId, username]);
 
   const [isCustomGender, setIsCustomGender] = React.useState<boolean>(
@@ -428,7 +428,6 @@ const EditProfile: React.FC<EditProfileProps> = ({route, navigation}) => {
                     invalidWarning={
                       'Website must be a valid link to your website'
                     }
-                    width={280}
                     value={form.website}
                   />
                   <TaggBigInput
@@ -492,46 +491,54 @@ const EditProfile: React.FC<EditProfileProps> = ({route, navigation}) => {
                     />
                   )}
                   {snapchat !== '' && (
-                    <TaggInput
-                      accessibilityHint="Snapchat Username"
-                      accessibilityLabel="Snapchat Username Input Field."
-                      attemptedSubmit={form.attemptedSubmit}
-                      autoCapitalize="none"
-                      autoCompleteType="off"
-                      autoCorrect={false}
-                      blurOnSubmit={false}
-                      enablesReturnKeyAutomatically={true}
-                      invalidWarning={'Please enter something!'}
-                      onChangeText={handleSnapchatUpdate}
-                      onSubmitEditing={Keyboard.dismiss}
-                      placeholder="Snapchat Username"
-                      returnKeyType="done"
-                      textContentType="none"
-                      valid={form.isValidSnapchat}
-                      value={form.snapchat && form.snapchat}
-                      width={280}
-                    />
+                    <View style={styles.row}>
+                      <SocialIcon social={'Snapchat'} style={styles.icon} />
+                      <View style={styles.taggInput}>
+                        <TaggInput
+                          accessibilityHint="Snapchat Username"
+                          accessibilityLabel="Snapchat Username Input Field."
+                          attemptedSubmit={form.attemptedSubmit}
+                          autoCapitalize="none"
+                          autoCompleteType="off"
+                          autoCorrect={false}
+                          blurOnSubmit={false}
+                          enablesReturnKeyAutomatically={true}
+                          invalidWarning={'Please enter something!'}
+                          onChangeText={handleSnapchatUpdate}
+                          onSubmitEditing={Keyboard.dismiss}
+                          placeholder="Username"
+                          returnKeyType="done"
+                          textContentType="none"
+                          valid={form.isValidSnapchat}
+                          value={form.snapchat && form.snapchat}
+                        />
+                      </View>
+                    </View>
                   )}
                   {tiktok !== '' && (
-                    <TaggInput
-                      accessibilityHint="TikTok Username"
-                      accessibilityLabel="TikTok Username Input Field."
-                      attemptedSubmit={form.attemptedSubmit}
-                      autoCapitalize="none"
-                      autoCompleteType="off"
-                      autoCorrect={false}
-                      blurOnSubmit={false}
-                      enablesReturnKeyAutomatically={true}
-                      invalidWarning={'Please enter something!'}
-                      onChangeText={handleTikTokUpdate}
-                      onSubmitEditing={Keyboard.dismiss}
-                      placeholder="TikTok Username"
-                      returnKeyType="done"
-                      textContentType="none"
-                      valid={form.isValidTiktok}
-                      value={form.tiktok}
-                      width={280}
-                    />
+                    <View style={styles.row}>
+                      <SocialIcon social={'TikTok'} style={styles.icon} />
+                      <View style={styles.taggInput}>
+                        <TaggInput
+                          accessibilityHint="TikTok Username"
+                          accessibilityLabel="TikTok Username Input Field."
+                          attemptedSubmit={form.attemptedSubmit}
+                          autoCapitalize="none"
+                          autoCompleteType="off"
+                          autoCorrect={false}
+                          blurOnSubmit={false}
+                          enablesReturnKeyAutomatically={true}
+                          invalidWarning={'Please enter something!'}
+                          onChangeText={handleTikTokUpdate}
+                          onSubmitEditing={Keyboard.dismiss}
+                          placeholder="Username"
+                          returnKeyType="done"
+                          textContentType="none"
+                          valid={form.isValidTiktok}
+                          value={form.tiktok}
+                        />
+                      </View>
+                    </View>
                   )}
                 </View>
               </View>
@@ -625,6 +632,17 @@ const styles = StyleSheet.create({
     borderRadius: 20,
     paddingLeft: 13,
   },
+  row: {
+    flex: 1,
+    flexDirection: 'row',
+    alignItems: 'center',
+    justifyContent: 'space-between',
+  },
+  icon: {
+    aspectRatio: 1,
+    flex: 1,
+  },
+  taggInput: {flex: 6.5, marginLeft: '3%'},
 });
 
 export default EditProfile;
-- 
cgit v1.2.3-70-g09d2

