From 410d9224f4e198ab0b8ecae35fa05c240a2439bf Mon Sep 17 00:00:00 2001 From: Tanmay Bhatia <38436012+tbhatia2299@users.noreply.github.com> Date: Mon, 14 Dec 2020 15:40:49 -0800 Subject: Removed the db field from edit profile (#137) --- src/screens/profile/EditProfile.tsx | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src') diff --git a/src/screens/profile/EditProfile.tsx b/src/screens/profile/EditProfile.tsx index 22c83985..50e1c006 100644 --- a/src/screens/profile/EditProfile.tsx +++ b/src/screens/profile/EditProfile.tsx @@ -59,7 +59,7 @@ const EditProfile: React.FC = ({route, navigation}) => { const y: Animated.Value = Animated.useValue(0); const {userId, username} = route.params; const { - profile: {website, biography, birthday, gender, snapchat, tiktok}, + profile: {website, biography, gender, snapchat, tiktok}, avatar, cover, } = useSelector((state: RootState) => state.user); @@ -82,7 +82,6 @@ const EditProfile: React.FC = ({route, navigation}) => { smallPic: avatar ? avatar : '', website: website ? website : '', bio: biography ? biography : '', - birthdate: birthday && moment(birthday).format('YYYY-MM-DD'), gender: isCustomGender ? 'custom' : gender, customGenderText: isCustomGender ? gender : '', snapchat: snapchat, @@ -220,12 +219,6 @@ const EditProfile: React.FC = ({route, navigation}) => { }); }; - const handleBirthdateUpdate = (birthdate: Date) => { - setForm({ - ...form, - birthdate: birthdate && moment(birthdate).format('YYYY-MM-DD'), - }); - }; const handleSnapchatUpdate = (newUsername: string) => { // Allow any username, empty means to "un-link" it @@ -296,10 +289,6 @@ const EditProfile: React.FC = ({route, navigation}) => { } } - if (form.birthdate) { - request.append('birthday', form.birthdate); - } - if (isCustomGender) { if (form.isValidGender) { request.append('gender', form.customGenderText); @@ -448,12 +437,6 @@ const EditProfile: React.FC = ({route, navigation}) => { width={280} value={form.bio} /> -