Add user data to profile widget

This commit is contained in:
Ramon Wenger 2020-02-17 16:50:07 +01:00
parent 5b67ecfb8c
commit ef4f8aefd3
1 changed files with 12 additions and 3 deletions

View File

@ -1,19 +1,28 @@
<template> <template>
<div class="profile-widget"> <div class="profile-widget">
<div class="profile-widget__avatar"> <div class="profile-widget__avatar">
<avatar :editable="true"></avatar> <avatar :avatar-url="me.avatarUrl" :editable="true"></avatar>
</div> </div>
<h3 class="profile-widget__name">Susanne Portmann</h3> <h3 class="profile-widget__name">{{me.firstName}} {{me.lastName}}</h3>
</div> </div>
</template> </template>
<script> <script>
import Avatar from '@/components/profile/Avatar'; import Avatar from '@/components/profile/Avatar';
import {meQuery} from '@/graphql/queries';
export default { export default {
components: { components: {
Avatar Avatar
} },
apollo: {
me: meQuery
},
data: () => ({
me: {}
})
} }
</script> </script>