Open History to see the last commit
1<script lang="ts">
2 import { useQueryClient } from '@tanstack/svelte-query'
3 import TodosList from './TodosList.svelte'
4 import EditTodo from './EditTodo.svelte'
5 import AddTodo from './AddTodo.svelte'
6 import { views, editingIndex } from '../lib/stores.svelte'
7β
8 const queryClient = useQueryClient()
9</script>
10β
11<div>
12 <div>
13 <button onclick={() => queryClient.invalidateQueries()}>
14 Force Refetch All
15 </button>
16 </div>
17 <br />
18 <hr />
19β
20 {#each views.value as view, index (index)}
21 <div>
22 <TodosList initialFilter={view} />
23 <br />
24 </div>
25 {/each}
26β
27 <button
28 onclick={() => {
29 views.value.push('')
30 }}
31 >
32 Add Filter List
33 </button>
34 <hr />
35β
36 {#if editingIndex.value !== null}
37 {#key editingIndex.value}
38 <EditTodo id={editingIndex.value} />
39 {/key}
40 <hr />
41 {/if}
42β
43 <AddTodo />
44</div>