Files
Lazuli/src/routes/(app)/search/+page.svelte

20 lines
595 B
Svelte
Raw Normal View History

<script lang="ts">
import { currentlyPlaying } from '$lib/stores'
import type { PageServerData } from './$types'
export let data: PageServerData
</script>
{#if data.searchResults}
2024-04-09 00:10:23 -04:00
{#await data.searchResults then searchResults}
{#each searchResults as searchResult}
<button
on:click={() => {
if (searchResult.type === 'song') $currentlyPlaying = searchResult
}}
class="block bg-neutral-925">{searchResult.name} - {searchResult.type}</button
>
2024-04-09 00:10:23 -04:00
{/each}
{/await}
{/if}