FitTrackee/fittrackee_client/src/views/DashBoard.vue

31 lines
778 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 UserStats from '@/components/Dashboard/UserStats.vue'
2021-08-18 17:10:16 +02:00
import { USER_STORE } from '@/store/constants'
2021-08-21 18:36:44 +02:00
import { IAuthUserProfile } from '@/types/user'
2021-08-18 17:10:16 +02:00
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>