search
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user