2017-11-15 08:12:56 +00:00
|
|
|
<template>
|
|
|
|
<span class="user-name">{{name}}</span>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import userSvc from '../services/userSvc';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: ['userId'],
|
|
|
|
computed: {
|
|
|
|
name() {
|
2018-07-17 19:58:40 +00:00
|
|
|
userSvc.getInfo(this.userId);
|
2018-06-21 19:16:33 +00:00
|
|
|
const userInfo = this.$store.state.userInfo.itemsById[this.userId];
|
2017-11-15 08:12:56 +00:00
|
|
|
return userInfo ? userInfo.name : 'Someone';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|