30 lines
807 B
Vue
30 lines
807 B
Vue
<script>
|
|
import {useUserStore} from "stores/User";
|
|
|
|
export default {
|
|
preFetch({store, currentRoute}) {
|
|
return useUserStore(store).fetchPublicUserDetail(currentRoute.params.username);
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<script setup>
|
|
import {storeToRefs} from "pinia";
|
|
import PilotProfileCard from "components/profile/PilotProfileCard.vue";
|
|
import PublicProfileSkeleton from "components/profile/skeletons/PublicProfileSkeleton.vue";
|
|
|
|
const {publicUser: pilot, isQueryRunning: pilotLoading} = storeToRefs(useUserStore());
|
|
</script>
|
|
|
|
<template>
|
|
<div class="row">
|
|
<div class="col-12 col-md-8">
|
|
<router-view :pilot="pilot"/>
|
|
</div>
|
|
<div class="col-12 col-md-4">
|
|
<PublicProfileSkeleton v-if="pilotLoading && !pilot"/>
|
|
<PilotProfileCard v-else :pilot="pilot"/>
|
|
</div>
|
|
</div>
|
|
</template>
|