FitTrackee/fittrackee_client/src/views/DashBoard.vue

31 lines
797 B
Vue
Raw Normal View History

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'
import { USER_STORE } from '@/store/constants'
import { IAuthUserProfile } from '@/store/modules/user/interfaces'
import { useStore } from '@/use/useStore'
import UserStats from '@/components/Dashboard/UserStats.vue'
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>