using router-link in who-to-follow-panel
This commit is contained in:
parent
5a97cfb959
commit
ef67bd693e
2 changed files with 10 additions and 10 deletions
|
@ -30,7 +30,7 @@ function showWhoToFollow (panel, users, aHost, aUser) {
|
||||||
.then((externalUser) => {
|
.then((externalUser) => {
|
||||||
if (!externalUser.error) {
|
if (!externalUser.error) {
|
||||||
panel.$store.commit('addNewUsers', [externalUser])
|
panel.$store.commit('addNewUsers', [externalUser])
|
||||||
panel.link1 = '/users/' + externalUser.id
|
panel.id1 = externalUser.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
|
@ -40,7 +40,7 @@ function showWhoToFollow (panel, users, aHost, aUser) {
|
||||||
.then((externalUser) => {
|
.then((externalUser) => {
|
||||||
if (!externalUser.error) {
|
if (!externalUser.error) {
|
||||||
panel.$store.commit('addNewUsers', [externalUser])
|
panel.$store.commit('addNewUsers', [externalUser])
|
||||||
panel.link2 = '/users/' + externalUser.id
|
panel.id2 = externalUser.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
|
@ -50,7 +50,7 @@ function showWhoToFollow (panel, users, aHost, aUser) {
|
||||||
.then((externalUser) => {
|
.then((externalUser) => {
|
||||||
if (!externalUser.error) {
|
if (!externalUser.error) {
|
||||||
panel.$store.commit('addNewUsers', [externalUser])
|
panel.$store.commit('addNewUsers', [externalUser])
|
||||||
panel.link3 = '/users/' + externalUser.id
|
panel.id3 = externalUser.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -88,14 +88,14 @@ function getWhoToFollow (panel) {
|
||||||
const WhoToFollowPanel = {
|
const WhoToFollowPanel = {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
img1: '/images/avi.png',
|
img1: '/images/avi.png',
|
||||||
link1: null,
|
|
||||||
name1: '',
|
name1: '',
|
||||||
|
id1: 0,
|
||||||
img2: '/images/avi.png',
|
img2: '/images/avi.png',
|
||||||
link2: null,
|
|
||||||
name2: '',
|
name2: '',
|
||||||
|
id2: 0,
|
||||||
img3: '/images/avi.png',
|
img3: '/images/avi.png',
|
||||||
link3: null,
|
name3: '',
|
||||||
name3: ''
|
id3: 0
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
user: function () {
|
user: function () {
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body who-to-follow">
|
<div class="panel-body who-to-follow">
|
||||||
<p>
|
<p>
|
||||||
<img v-bind:src="img1"/> <a v-bind:href="link1">{{ name1 }}</a><br>
|
<img v-bind:src="img1"/><router-link :to="{ name: 'user-profile', params: { id: id1 } }">{{ name1 }}</router-link><br>
|
||||||
<img v-bind:src="img2"/> <a v-bind:href="link2">{{ name2 }}</a><br>
|
<img v-bind:src="img2"/><router-link :to="{ name: 'user-profile', params: { id: id2 } }">{{ name2 }}</router-link><br>
|
||||||
<img v-bind:src="img3"/> <a v-bind:href="link3">{{ name3 }}</a><br>
|
<img v-bind:src="img3"/><router-link :to="{ name: 'user-profile', params: { id: id3 } }">{{ name3 }}</router-link><br>
|
||||||
<img v-bind:src="$store.state.config.logo"> <a v-bind:href="moreUrl" target="_blank">More</a>
|
<img v-bind:src="$store.state.config.logo"> <a v-bind:href="moreUrl" target="_blank">More</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue