aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2020-12-14 16:37:21 -0500
committerGitHub <noreply@github.com>2020-12-14 16:37:21 -0500
commitb505c851d3dfffc2f2efd12d99422ba3727ba88e (patch)
tree15bc5d183e23afc0407ebb82091433263487026c /src/screens
parent19a9f370bc99b72e320ebda2125fd7ca9eb0f0ef (diff)
added icons (#139)
Co-authored-by: Ashm Walia <40498934+ashmgarv@users.noreply.github.com>
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/profile/EditProfile.tsx98
1 files changed, 58 insertions, 40 deletions
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;