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,5 +1,6 @@
import { useCallback, useState } from "preact/hooks";
import { IconWand } from "@components/icons.tsx";
import { RecommendationResource } from "@lib/recommendation.ts";
type RecommendationState = "disabled" | "loading";
@@ -11,7 +12,7 @@ export function Recommendations(
},
) {
const [state, setState] = useState<RecommendationState>("disabled");
const [results, setResults] = useState();
const [results, setResults] = useState<RecommendationResource[]>();
const startFetch = useCallback(
async () => {
@@ -44,9 +45,9 @@ export function Recommendations(
<div class="flex gap-5 items-center mb-4">
<img
class="w-12 h-12 rounded-full object-cover"
src={`https://image.tmdb.org/t/p/original${res.poster_path}`}
src={`https://image.tmdb.org/t/p/original${res.id}`}
/>
<p>{res.title}</p>
<p>{res.id}</p>
</div>
);
})}
@@ -66,6 +67,7 @@ export function Recommendations(
{!results && state === "disabled" &&
(
<button
type="submit"
onClick={startFetch}
class="ml-8 mt-2 font-thin flex items-center gap-2 text-white my-2"
>