My blog (https://blog.eldridge.cam)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix tag filter buttons

+5 -5
+4 -4
src/app/Index.svelte
··· 25 25 let searchLoading = $state(false); 26 26 let embedded = $state(null); 27 27 28 - function applyFilter(event) { 29 - if (event.detail.tag) { 30 - filter = event.detail.tag; 28 + function applyFilter(tag) { 29 + if (tag) { 30 + filter = tag; 31 31 } else { 32 32 filter = null; 33 33 } ··· 120 120 </div> 121 121 {:else} 122 122 {#each filteredArticles as article (article.id)} 123 - <Summary {...article} on:filter={applyFilter} /> 123 + <Summary {...article} onfilter={applyFilter} /> 124 124 {/each} 125 125 {/if} 126 126 </div>
+1 -1
src/component/Summary.svelte
··· 38 38 <div class="tags"> 39 39 {#each tags as tag} 40 40 <div class="tag"> 41 - <Link on:click={() => onfilter?.({ tag })}> 41 + <Link onclick={() => onfilter?.(tag)}> 42 42 <Text>#{tag}</Text> 43 43 </Link> 44 44 </div>