<script lang="ts">
	import PostCard from '$lib/card-collections/cards/PostCard.svelte';
	import Header from '$lib/header.svelte';
	import type { ArticleSummary } from '$lib/posts/types.js';

	export let data;
	let posts: ArticleSummary[];
	$: posts = JSON.parse(data.data);

	let title: string;
	$: title = `tag: ${data.tag}`;
</script>

<Header {title} />

{#each posts as post}
	<PostCard {post} />
{/each}
