2022-10-13 04:17:30 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import type { ActionData, PageData } from './$types';
|
|
|
|
|
import { gameStore } from '$lib/stores/gameSearchStore';
|
2022-10-14 04:01:01 +00:00
|
|
|
import TextSearch from '$lib/components/search/textSearch/index.svelte';
|
2022-10-13 04:17:30 +00:00
|
|
|
|
|
|
|
|
export let data: PageData;
|
|
|
|
|
export let form: ActionData;
|
|
|
|
|
|
|
|
|
|
$: if (data?.games) {
|
|
|
|
|
gameStore.removeAll();
|
|
|
|
|
gameStore.addAll(data?.games);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-14 03:54:44 +00:00
|
|
|
$: if (form?.games) {
|
|
|
|
|
gameStore.removeAll();
|
|
|
|
|
gameStore.addAll(form?.games);
|
|
|
|
|
}
|
2022-10-13 04:17:30 +00:00
|
|
|
</script>
|
|
|
|
|
|
2022-10-14 04:01:01 +00:00
|
|
|
<div class="game-search">
|
2022-11-10 04:02:38 +00:00
|
|
|
<TextSearch showButton advancedSearch {data} {form} />
|
2022-10-14 04:01:01 +00:00
|
|
|
</div>
|