fix: soo many lint errors

This commit is contained in:
Max Richter
2025-11-03 00:03:27 +01:00
parent c13420c3ab
commit 696082250d
41 changed files with 373 additions and 500 deletions

View File

@@ -1,20 +1,19 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { MainLayout } from "@components/layouts/main.tsx";
import { Recipe } from "@lib/recipeSchema.ts";
import { Grid } from "@components/Grid.tsx";
import { IconArrowLeft } from "@components/icons.tsx";
import { KMenu } from "@islands/KMenu.tsx";
import { RedirectSearchHandler } from "@islands/Search.tsx";
import { GenericResource } from "@lib/types.ts";
import { ResourceCard } from "@components/Card.tsx";
import { fetchResource, listResources } from "@lib/marka/index.ts";
import { listResources } from "@lib/marka/index.ts";
import { parseResourceUrl, searchResource } from "@lib/search.ts";
import { GenericResource, RecipeResource } from "@lib/marka/schema.ts";
export const handler: Handlers<
{ recipes: Recipe[] | null; searchResults?: GenericResource[] }
{ recipes: RecipeResource[] | null; searchResults?: GenericResource[] }
> = {
async GET(req, ctx) {
const recipes = await listResources("recipes");
const recipes = await listResources<RecipeResource>("recipes");
const searchParams = parseResourceUrl(req.url);
const searchResults = searchParams &&
await searchResource({ ...searchParams, types: ["recipe"] });
@@ -24,7 +23,7 @@ export const handler: Handlers<
export default function Greet(
props: PageProps<
{ recipes: Recipe[] | null; searchResults: GenericResource[] }
{ recipes: RecipeResource[] | null; searchResults: GenericResource[] }
>,
) {
const { recipes, searchResults } = props.data;