From ff467b773e3196d769cf4785a07273598ad7fd28 Mon Sep 17 00:00:00 2001 From: ejmudrak Date: Sun, 11 Feb 2018 12:49:24 -0500 Subject: [PATCH 1/2] Delete button works for all edit profile pages --- src/presentation/locationProfile/EditLocationProfile.js | 2 +- src/presentation/profile/EditProfile.js | 6 +++--- src/presentation/vendorProfile/EditVendorProfile.js | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/presentation/locationProfile/EditLocationProfile.js b/src/presentation/locationProfile/EditLocationProfile.js index 1662dbe..babfba1 100644 --- a/src/presentation/locationProfile/EditLocationProfile.js +++ b/src/presentation/locationProfile/EditLocationProfile.js @@ -483,7 +483,7 @@ class EditLocationProfile extends React.Component { editLocationVideo(video, values.title, values.url, locationId) }} onDelete={() => { - removeLocationVideo(video, videoType, locationId) + removeLocationVideo(video, locationId) this.handleEditVideoClose() }} initialValues={{ title: video.title, url: video.url }} diff --git a/src/presentation/profile/EditProfile.js b/src/presentation/profile/EditProfile.js index bdc9ba0..808e75c 100644 --- a/src/presentation/profile/EditProfile.js +++ b/src/presentation/profile/EditProfile.js @@ -265,7 +265,7 @@ class EditProfile extends React.Component { const isPublic = get(profile, 'public', false) const video = get(userProfile, 'video', '')[0] let videoType = 0 - if (video) videoType = video.url.indexOf('youtube') > -1 ? 1 : 2 // 1 for Youtube, 2 for Vimeo + if (video) videoType = video.url.indexOf('youtube') > -1 ? 1 : 2 // 1 for Youtube, 2 for Vimeo const addYoutubeActions = [ { - removeVideo(video, videoType, uid) + removeVideo(video, uid) this.handleEditVideoClose() }} initialValues={{ title: video.title, url: video.url }} @@ -676,7 +676,7 @@ class EditProfile extends React.Component {
{ associatedCredits.map(credit => ( -
+
{credit.year}{credit.genre ? ` (${credit.genre})` : ''} : {credit.title}
diff --git a/src/presentation/vendorProfile/EditVendorProfile.js b/src/presentation/vendorProfile/EditVendorProfile.js index a5aed50..48d7062 100644 --- a/src/presentation/vendorProfile/EditVendorProfile.js +++ b/src/presentation/vendorProfile/EditVendorProfile.js @@ -144,7 +144,7 @@ class EditVendorProfile extends React.Component { const isPublic = get(vendorProfile, 'public', false) const video = get(vendorProfile, 'video', '')[0] let videoType = 0 - if(video) videoType = video.url.indexOf("youtube") > -1 ? 1 : 2 // 1 for Youtube, 2 for Vimeo + if(video) videoType = video.url.indexOf("youtube") > -1 ? 1 : 2 // 1 for Youtube, 2 for Vimeo const profileImageUrl = get(vendorProfile, 'profileImage', 'https://images.vexels.com/media/users/3/144866/isolated/preview/927c4907bbd0598c70fb79de7af6a35c-business-building-silhouette-by-vexels.png') const addLinkActions = [ @@ -591,7 +591,7 @@ class EditVendorProfile extends React.Component { editVendorVideo(video, values.title, values.url, vendorId) }} onDelete={() => { - removeVendorVideo(video, videoType, vendorId) + removeVendorVideo(video, vendorId) this.handleEditVideoClose() }} initialValues={{ title: video.title, url: video.url }} @@ -637,7 +637,7 @@ class EditVendorProfile extends React.Component { }
- +
) } @@ -681,4 +681,3 @@ const EditVendorProfileFormEnriched = reduxForm({ })(EditVendorProfile) export default EditVendorProfileFormEnriched - From 04acfb5b916a4d6d51abde2004569799371555cc Mon Sep 17 00:00:00 2001 From: ejmudrak Date: Sun, 11 Feb 2018 13:00:37 -0500 Subject: [PATCH 2/2] removed unused variables --- src/presentation/locationProfile/EditLocationProfile.js | 2 -- src/presentation/profile/EditProfile.js | 2 -- src/presentation/vendorProfile/EditVendorProfile.js | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/presentation/locationProfile/EditLocationProfile.js b/src/presentation/locationProfile/EditLocationProfile.js index babfba1..bd39196 100644 --- a/src/presentation/locationProfile/EditLocationProfile.js +++ b/src/presentation/locationProfile/EditLocationProfile.js @@ -129,8 +129,6 @@ class EditLocationProfile extends React.Component { const locationLinks = get(locationProfile, 'links', []) const isPublic = get(locationProfile, 'public', false) const video = get(locationProfile, 'video', '')[0] - let videoType = 0 - if (video) videoType = video.url.indexOf('youtube') > -1 ? 1 : 2 // 1 for Youtube, 2 for Vimeo const addLinkActions = [ -1 ? 1 : 2 // 1 for Youtube, 2 for Vimeo const addYoutubeActions = [ -1 ? 1 : 2 // 1 for Youtube, 2 for Vimeo const profileImageUrl = get(vendorProfile, 'profileImage', 'https://images.vexels.com/media/users/3/144866/isolated/preview/927c4907bbd0598c70fb79de7af6a35c-business-building-silhouette-by-vexels.png') const addLinkActions = [