frontend: delay fullpage init after post fetch
Signed-off-by: Nicolas Froger <nicolas@kektus.xyz>
This commit is contained in:
parent
4d5165473b
commit
90163b5db5
2 changed files with 16 additions and 5 deletions
|
|
@ -11,7 +11,7 @@ export const usePostsStore = defineStore('posts', () => {
|
|||
const posts = ref([])
|
||||
|
||||
function fetchPosts() {
|
||||
fetch(postsApiPath)
|
||||
return fetch(postsApiPath)
|
||||
.then((response) => {
|
||||
return response.json()
|
||||
})
|
||||
|
|
@ -28,7 +28,5 @@ export const usePostsStore = defineStore('posts', () => {
|
|||
})
|
||||
}
|
||||
|
||||
fetchPosts()
|
||||
|
||||
return { posts }
|
||||
return { posts, fetchPosts }
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue