<script lang="ts">
  let { data, form } = $props<{ threads: Array }>();
  $inspect(data)
</script>

<svelte:head>
	<title></title>
	<meta name="description" content="" />
</svelte:head>

<section>
	{#each data.threads as thread}
    <a href="thread/{thread.name}">{thread.title}</a>
  {/each}
  <form method="POST">
    <input type="text" name="title">
    <input hidden type="text" name="uid" bind:value={data.uid}>
    <button>Create</button>
  </form>
</section>

<style lang="scss">
	section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
	}
</style>