FitTrackee/fittrackee_client/src/components/User/ProfileDisplay/index.vue

54 lines
1.1 KiB
Vue
Raw Normal View History

2021-10-13 17:29:12 +02:00
<template>
<div id="user-profile">
<UserHeader :user="user" />
2021-10-17 11:48:00 +02:00
<div class="box">
<UserProfileTabs :tabs="tabs" :selectedTab="tab" :edition="false" />
<router-view :user="user"></router-view>
2021-10-13 17:29:12 +02:00
</div>
</div>
</template>
<script lang="ts">
import { PropType, defineComponent } from 'vue'
2021-10-13 17:29:12 +02:00
import UserHeader from '@/components/User/ProfileDisplay/UserHeader.vue'
import UserProfileTabs from '@/components/User/UserProfileTabs.vue'
2021-10-13 17:29:12 +02:00
import { IAuthUserProfile } from '@/types/user'
export default defineComponent({
name: 'ProfileDisplay',
2021-10-17 11:48:00 +02:00
components: {
UserHeader,
UserProfileTabs,
2021-10-17 11:48:00 +02:00
},
2021-10-13 17:29:12 +02:00
props: {
user: {
type: Object as PropType<IAuthUserProfile>,
required: true,
},
tab: {
type: String,
required: true,
},
2021-10-13 17:29:12 +02:00
},
setup() {
return {
tabs: ['PROFILE', 'PREFERENCES'],
}
2021-10-13 17:29:12 +02:00
},
})
</script>
<style lang="scss" scoped>
@import '~@/scss/base.scss';
#user-profile {
margin: auto;
width: 700px;
@media screen and (max-width: $medium-limit) {
width: 100%;
margin: 0 auto 50px auto;
}
}
</style>