Basic post display
This commit is contained in:
10
src/routes/+page.ts
Normal file
10
src/routes/+page.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import type { Post } from '$lib/mastodon/response';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load = (async ({ fetch }) => {
|
||||
const p = await fetch('/');
|
||||
//const posts: Post[] = await p.json();
|
||||
return {
|
||||
posts: await p.json() as Post[]
|
||||
};
|
||||
}) satisfies PageLoad;
|
Reference in New Issue
Block a user