all repos — kōi @ b5de4391b4e6ac6d03170feb4108ea1b84312528

Minimalist task manager

src/routes/+page.svelte (view raw)

 1<script lang="ts">
 2	import { db } from '$lib/db';
 3	import { liveQuery } from 'dexie';
 4	import NewTask from './NewTask.svelte';
 5	import Task from './Task.svelte';
 6
 7	let tasks = liveQuery(() => db.tasks.toArray());
 8</script>
 9
10<div class="py-4 flex flex-col gap-4">
11	{#each $tasks as task (task.id)}
12		<Task {task} />
13	{:else}
14		<p class="text-center">Aucune tâche actuellement</p>
15	{/each}
16</div>
17
18<NewTask />