aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHakaba Hitoyo <hakabahitoyo@example.com>2018-03-28 16:56:47 +0900
committerHakaba Hitoyo <hakabahitoyo@example.com>2018-03-28 16:56:47 +0900
commitcaad81800963730f9d3ef1325bf5f55dd29fde9a (patch)
treedf701d8a014303790f798fd73a9a15d938ffa414 /src
parent96426425b8a20a1ff270e2b1f289528aa8e4dc8f (diff)
using internal link to users
Diffstat (limited to 'src')
-rw-r--r--src/components/who_to_follow_panel/who_to_follow_panel.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.js b/src/components/who_to_follow_panel/who_to_follow_panel.js
index e3f06ab6..2d376ef9 100644
--- a/src/components/who_to_follow_panel/who_to_follow_panel.js
+++ b/src/components/who_to_follow_panel/who_to_follow_panel.js
@@ -28,14 +28,35 @@ function showWhoToFollow (panel, users, aHost, aUser) {
panel.img1 = img
panel.link1 = link
panel.name1 = name
+ this.$store.state.api.backendInteractor.externalProfile(name)
+ .then((externalUser) => {
+ if (!externalUser.error) {
+ this.$store.commit('addNewUsers', [externalUser])
+ panel.link1 = 'https://' + host + '/users/' + externalUser.id
+ }
+ })
} else if (index === 1) {
panel.img2 = img
panel.link2 = link
panel.name2 = name
+ this.$store.state.api.backendInteractor.externalProfile(name)
+ .then((externalUser) => {
+ if (!externalUser.error) {
+ this.$store.commit('addNewUsers', [externalUser])
+ panel.link2 = 'https://' + host + '/users/' + externalUser.id
+ }
+ })
} else if (index === 2) {
panel.img3 = img
panel.link3 = link
panel.name3 = name
+ this.$store.state.api.backendInteractor.externalProfile(name)
+ .then((externalUser) => {
+ if (!externalUser.error) {
+ this.$store.commit('addNewUsers', [externalUser])
+ panel.link3 = 'https://' + host + '/users/' + externalUser.id
+ }
+ })
}
index = index + 1
if (index > 2) {