We are half way there
This commit is contained in:
12
src/routes/+layout.ts
Normal file
12
src/routes/+layout.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import type { LayoutLoad } from './$types';
|
||||
|
||||
export const load = (async ({ fetch, url }) => {
|
||||
const blogPostsResponse = await fetch(`/blog/articles/pageSize/5.json`)
|
||||
const blogPostsContent = await blogPostsResponse.json()
|
||||
|
||||
return {
|
||||
latestPosts: blogPostsContent.posts.items,
|
||||
// TODO Check if not bugged FIXME
|
||||
segment: '',
|
||||
}
|
||||
}) satisfies LayoutLoad
|
Reference in New Issue
Block a user