fix: soo many lint errors
This commit is contained in:
@@ -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"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user