2024-03-30 01:15:12 -04:00
|
|
|
<script lang="ts">
|
2024-04-13 00:45:35 -04:00
|
|
|
import { currentlyPlaying } from '$lib/stores'
|
2024-03-30 01:15:12 -04:00
|
|
|
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}
|
2024-04-13 00:45:35 -04:00
|
|
|
<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}
|
2024-03-30 01:15:12 -04:00
|
|
|
{/if}
|