Fix fetching

This commit is contained in:
2021-04-26 14:01:24 +02:00
parent 57b6d8d4bc
commit 6e0d493921
3 changed files with 29 additions and 31 deletions

View File

@@ -2,8 +2,8 @@
<main>
<Banner />
<AboutHome />
<PostsHome :posts="posts"/>
<ProjectsHome :projects="projects"/>
<PostsHome />
<ProjectsHome />
<AdHome />
</main>
</template>
@@ -18,27 +18,6 @@ export default Vue.extend({
return {
title: 'Arthur Danjou - FullStack Web & Software Developer'
}
},
setup() {
const { $content, i18n } = useContext()
const projects = useAsync(() => {
return $content(`projects`)
.limit(3)
.fetch<Project>()
})
const posts = useAsync(() => {
return $content(`articles/${i18n.locale}`)
.sortBy('date', 'asc')
.limit(3)
.fetch<Post>()
})
return {
posts,
projects
}
}
})
</script>