profile page, but lotsa issues

This commit is contained in:
Annika
2022-08-03 12:03:15 -06:00
parent 858b807f61
commit 68dc18954d
8 changed files with 228 additions and 20 deletions
+45
View File
@@ -0,0 +1,45 @@
<template>
<div class="component">
<!-- none of this is loading... dafuq? -->
{{ profile?.name }}
{{ keeps[0]?.name }}
{{ vaults[0]?.name }}
</div>
</template>
<script>
import VaultsList from '../components/VaultsList.vue'
import KeepsList from '../components/KeepsList.vue';
import { profilesService } from '../services/ProfilesService'
import { computed, onMounted } from 'vue'
import { AppState } from '../AppState';
import { logger } from '../utils/Logger.js'
import { useRoute } from 'vue-router'
export default {
setup() {
const route = useRoute()
onMounted(async () => {
try {
await profilesService.getProfile(route.params.id)
await profilesService.getKeeps(route.params.id)
await profilesService.getVaults(route.params.id)
} catch (error) {
logger.error(error)
}
})
return {
components: { VaultsList, KeepsList },
profile: computed(() => {AppState.activeProfile}),
keeps: computed(() => {AppState.profileKeeps}),
vaults: computed(() => {AppState.profileVaults})
};
}
}
</script>
<style lang="scss" scoped>
</style>