mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-28 10:50:36 +01:00
Fix fetching
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user