2021-07-25 13:34:44 +02:00
|
|
|
<template>
|
2021-08-08 11:49:01 +02:00
|
|
|
<div id="dashboard">
|
2021-08-18 17:10:16 +02:00
|
|
|
<div class="container">
|
|
|
|
<UserStats :user="authUser" v-if="authUser.username" />
|
|
|
|
</div>
|
2021-07-25 13:34:44 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
2021-08-18 17:10:16 +02:00
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { computed, ComputedRef, defineComponent } from 'vue'
|
|
|
|
|
2021-08-21 18:34:06 +02:00
|
|
|
import UserStats from '@/components/Dashboard/UserStats.vue'
|
2021-08-18 17:10:16 +02:00
|
|
|
import { USER_STORE } from '@/store/constants'
|
|
|
|
import { IAuthUserProfile } from '@/store/modules/user/interfaces'
|
|
|
|
import { useStore } from '@/use/useStore'
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
name: 'Dashboard',
|
|
|
|
components: {
|
|
|
|
UserStats,
|
|
|
|
},
|
|
|
|
setup() {
|
|
|
|
const store = useStore()
|
|
|
|
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
|
|
|
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
|
|
|
)
|
|
|
|
return { authUser }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
</script>
|