From 3fe271f400325d6e792304726cfd984c4bd2176d Mon Sep 17 00:00:00 2001
From: Berke Güzel <wenekar1@gmail.com>
Date: Mon, 9 Feb 2026 00:17:47 +0300
Subject: better optimized builds?

---
 src/routes/+page.svelte | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/routes/+page.svelte')

diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index e304a68..b2c92b4 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,8 +1,8 @@
 <script lang="ts">
+	import type { PageData } from "./$types";
 	import PostCard from "$lib/components/PostCard.svelte";
-	import { getPosts } from "$lib/utils/posts";
 
-	const posts = getPosts();
+	let { data }: { data: PageData } = $props();
 </script>
 
 <svelte:head>
@@ -14,10 +14,10 @@
 </svelte:head>
 
 <section>
-	{#if posts.length === 0}
+	{#if data.posts.length === 0}
 		<p>No posts.</p>
 	{:else}
-		{#each posts as post}
+		{#each data.posts as post}
 			<PostCard {post} />
 		{/each}
 	{/if}
-- 
cgit v1.2.3

