diff --git a/webapp/components/SocialMedia/SocialMedia.vue b/webapp/components/SocialMedia/SocialMedia.vue
new file mode 100644
index 000000000..68e52fae1
--- /dev/null
+++ b/webapp/components/SocialMedia/SocialMedia.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+ {{ $t('profile.socialMedia') }} {{ userName | truncate(15) }}?
+
+
+
+
+
+ {{ link.username }}
+
+
+
+
+
+
+
+
+
diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue
index 26b018cae..58011ea1c 100644
--- a/webapp/pages/profile/_id/_slug.vue
+++ b/webapp/pages/profile/_id/_slug.vue
@@ -103,23 +103,7 @@
type="following"
@fetchAllConnections="fetchAllConnections"
/>
-
-
-
-
- {{ $t('profile.socialMedia') }} {{ userName | truncate(15) }}?
-
-
-
-
-
- {{ link.username }}
-
-
-
-
-
-
+
@@ -243,6 +227,7 @@ import { muteUser, unmuteUser } from '~/graphql/settings/MutedUsers'
import { blockUser, unblockUser } from '~/graphql/settings/BlockedUsers'
import PostMutations from '~/graphql/PostMutations'
import UpdateQuery from '~/components/utils/UpdateQuery'
+import SocialMedia from '~/components/SocialMedia/SocialMedia'
const tabToFilterMapping = ({ tab, id }) => {
return {
@@ -254,6 +239,7 @@ const tabToFilterMapping = ({ tab, id }) => {
export default {
components: {
+ SocialMedia,
PostTeaser,
HcFollowButton,
HcCountTo,
@@ -292,17 +278,6 @@ export default {
user() {
return this.User ? this.User[0] : {}
},
- socialMediaLinks() {
- const { socialMedia = [] } = this.user
- return socialMedia.map((socialMedia) => {
- const { url } = socialMedia
- const matches = url.match(/^(?:https?:\/\/)?(?:[^@\n])?(?:www\.)?([^:/\n?]+)/g)
- const [domain] = matches || []
- const favicon = domain ? `${domain}/favicon.ico` : null
- const username = url.split('/').pop()
- return { url, username, favicon }
- })
- },
userName() {
const { name } = this.user || {}
return name || this.$t('profile.userAnonym')