fix: make search work
This commit is contained in:
@@ -16,7 +16,7 @@ export const handler: Handlers<
|
||||
const recipes = await listResources<RecipeResource>("recipes");
|
||||
const searchParams = parseResourceUrl(req.url);
|
||||
const searchResults = searchParams &&
|
||||
await searchResource({ ...searchParams, types: ["recipe"] });
|
||||
await searchResource({ ...searchParams, types: ["recipes"] });
|
||||
return ctx.render({ recipes, searchResults });
|
||||
},
|
||||
};
|
||||
@@ -32,10 +32,10 @@ export default function Greet(
|
||||
url={props.url}
|
||||
title="Recipes"
|
||||
searchResults={searchResults}
|
||||
context={{ type: "recipe" }}
|
||||
context={{ type: "recipes" }}
|
||||
>
|
||||
<RedirectSearchHandler />
|
||||
<KMenu type="main" context={{ type: "recipe" }} />
|
||||
<KMenu type="main" context={{ type: "recipes" }} />
|
||||
<header class="flex gap-4 items-center mb-2 lg:mb-5 md:hidden">
|
||||
<a
|
||||
class="px-4 lg:ml-4 py-2 bg-gray-300 text-gray-800 rounded-lg flex items-center gap-1"
|
||||
|
||||
Reference in New Issue
Block a user