formies/frontend/src/routes/+page.svelte
Mohamad 3ba56ca232
Some checks failed
Build and Deploy / build (push) Failing after 7s
frontend changes
2024-12-27 15:40:42 +01:00

24 lines
401 B
Svelte

<script lang="ts">
import { onMount } from 'svelte';
import { getForms } from '../lib/api';
import type { Form } from '../lib/types';
let forms: any;
onMount(async () => {
forms = await getForms();
});
</script>
<h1>Form Management Tool</h1>
<a href="/create">Create a New Form</a>
<ul>
{#each forms as form}
<li>
<a href={`/form/${form.id}`}>{form.name}</a>
</li>
{/each}
</ul>