From 7da9baf74866a278a8d1b67f7414695b00d06141 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Mon, 25 Mar 2019 20:18:49 -0300 Subject: [PATCH] Update socialMediaIconUrl, display linked icons - After successfully adding a socialMedia, update the sociaMeidaIconUrl, and iterate over them to display their icons, which link to the user's profile. Co-authored-by: Joseph Ngugi --- webapp/pages/settings/my-social-media.vue | 25 +++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/webapp/pages/settings/my-social-media.vue b/webapp/pages/settings/my-social-media.vue index 07d981a76..334d21770 100644 --- a/webapp/pages/settings/my-social-media.vue +++ b/webapp/pages/settings/my-social-media.vue @@ -23,11 +23,17 @@ margin-top="base" margin="x-small" > -
- +
+ + +
@@ -38,7 +44,7 @@ import { mapGetters } from 'vuex' export default { props: { - socialMedia: { + socialMediaIconUrl: { type: Array, default: () => [] } @@ -66,9 +72,12 @@ export default { url: this.value } }) - .then(() => - this.$toast.success(this.$t('settings.social-media.success')) + .then( + response => (this.socialMediaIconUrl = response.data.addSocialMedia) ) + .finally(() => { + this.$toast.success(this.$t('settings.social-media.success')) + }) } } }