mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
21 lines
511 B
Vue
21 lines
511 B
Vue
<template lang="pug">
|
|
b-link(
|
|
v-if='user && user.profile',
|
|
@click.prevent='showProfile(user)'
|
|
) {{user.profile.name}}
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: ['user'],
|
|
methods: {
|
|
async showProfile (user) {
|
|
let heroDetails = await this.$store.dispatch('members:fetchMember', { memberId: user._id });
|
|
this.$root.$emit('habitica:show-profile', {
|
|
user: heroDetails.data.data,
|
|
startingPage: 'profile',
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script> |