mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
Using custom game store and updating colors of links.
This commit is contained in:
parent
7491c001da
commit
f0691b9936
2 changed files with 7 additions and 4 deletions
|
|
@ -6,9 +6,10 @@
|
|||
import Listbox from '$lib/components/listbox.svelte';
|
||||
import Loading from '$lib/components/loading.svelte';
|
||||
import Portal from '$lib/Portal.svelte';
|
||||
import { gameStore } from '$lib/stores/gameSearchStore';
|
||||
// import { enhance } from "$lib/form";
|
||||
|
||||
let games: GameType[] = [];
|
||||
// let games: GameType[] = [];
|
||||
let submitting = false;
|
||||
|
||||
async function handleSubmit(event: SubmitEvent) {
|
||||
|
|
@ -22,7 +23,9 @@
|
|||
});
|
||||
const responseData = await response.json();
|
||||
submitting = false;
|
||||
games = responseData?.games;
|
||||
gameStore.removeAll();
|
||||
gameStore.addAll(responseData?.games);
|
||||
// games = responseData?.games;
|
||||
}
|
||||
|
||||
let minAge = 0;
|
||||
|
|
@ -131,7 +134,7 @@
|
|||
|
||||
<h1>Games</h1>
|
||||
<div class="games">
|
||||
{#each games as game}
|
||||
{#each $gameStore as game}
|
||||
<Game {game} />
|
||||
{/each}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ body {
|
|||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--color-text-primary);
|
||||
color: var(--clr-txt);
|
||||
}
|
||||
|
||||
fieldset {
|
||||
|
|
|
|||
Loading…
Reference in a new issue