Ne uplne otestovany prepis storu
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
<script setup>
|
||||
import {useRoute} from "vue-router";
|
||||
import {user as pilot, loading as pilotLoading} from "src/composables/objects/user";
|
||||
import PublicProfileSkeleton from "components/profile/PublicProfileSkeleton.vue";
|
||||
import {storeToRefs} from "pinia";
|
||||
import {useUserStore} from "stores/User";
|
||||
import PilotProfileCard from "components/profile/PilotProfileCard.vue";
|
||||
import {onMounted} from "vue";
|
||||
|
||||
const loggedUser = storeToRefs(useUserStore()).user;
|
||||
const username = useRoute().params.username;
|
||||
|
||||
const {publicUser: pilot, isQueryRunning: pilotLoading} = storeToRefs(useUserStore());
|
||||
|
||||
onMounted(() => {
|
||||
useUserStore().fetchPublicUserDetail(username);
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -16,7 +22,7 @@ const username = useRoute().params.username;
|
||||
<router-view :logged-user="loggedUser" :username="username"/>
|
||||
</div>
|
||||
<div class="col-12 col-md-4">
|
||||
<PublicProfileSkeleton v-if="pilotLoading"/>
|
||||
<PublicProfileSkeleton v-if="pilotLoading || !pilot"/>
|
||||
<PilotProfileCard v-else :pilot="pilot"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user