Search changes

This commit is contained in:
Sean Morley
2024-06-01 18:16:58 +00:00
parent 113799261a
commit 23916e9e38
3 changed files with 4189 additions and 6 deletions

View File

@@ -1,5 +1,24 @@
<script lang="ts">
import AdventureCard from "$lib/components/AdventureCard.svelte";
import type { Adventure } from "$lib/utils/types";
import type { PageData } from "./$types";
export let data: PageData;
let adventureArray: Adventure[] = data.props?.adventures as Adventure[];
console.log(adventureArray);
</script>
<main>
<h1 class="text-center font-bold text-4xl">Search Results</h1>
{#if adventureArray.length > 0}
<div
class="grid xl:grid-cols-3 lg:grid-cols-3 md:grid-cols-2 sm:grid-cols-1 gap-4 mt-4 content-center auto-cols-auto ml-6 mr-6"
>
{#each adventureArray as adventure}
<AdventureCard {adventure} type="mylog" />
{/each}
</div>
{:else}
<p>No results found</p>
{/if}
</main>