This commit is contained in:
Sean Morley
2024-07-18 14:55:23 -04:00
parent 5e70130000
commit e650a81109
6 changed files with 61 additions and 49 deletions

View File

@@ -172,7 +172,7 @@
<h1 class="text-center font-bold text-4xl mb-6">My Adventures</h1>
<p class="text-center">This search returned {count} results.</p>
{#if adventures.length === 0}
<NotFound />
<NotFound error={undefined} />
{/if}
<div class="p-4">
<button

View File

@@ -34,6 +34,7 @@ export const load = (async (event) => {
};
} else {
console.error('Failed to fetch search data');
return { data: [] };
let error = await res.json();
return { error: error.error };
}
}) satisfies PageServerLoad;

View File

@@ -18,7 +18,7 @@
</script>
{#if adventures.length === 0}
<NotFound />
<NotFound error={data.error} />
{:else}
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
{#each adventures as adventure}