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,9 +1,9 @@
import { isYoutubeLink } from "@lib/string.ts";
import { IconBrandYoutube } from "@components/icons.tsx";
import { GenericResource } from "@lib/types.ts";
import { SmallRating } from "@components/Rating.tsx";
import { Link } from "@islands/Link.tsx";
import { parseRating } from "@lib/helpers.ts";
import { GenericResource, getNameOfResource } from "@lib/marka/schema.ts";
export function Card(
{
@@ -101,14 +101,16 @@ export function ResourceCard(
? `/api/images?image=${img}&width=200&height=200`
: "/placeholder.svg";
const rating = res.content.reviewRating?.ratingValue
? parseRating(res.content.reviewRating.ratingValue)
: undefined;
return (
<Card
title={res.content?.name || res.content?.itemReviewed?.name ||
res.content?.headline ||
res?.name}
title={getNameOfResource(res)}
backgroundColor={res.image?.average}
thumbhash={res.image?.blurhash}
rating={parseRating(res.content?.reviewRating?.ratingValue)}
thumbhash={res.image?.thumbhash}
rating={rating}
image={imageUrl}
link={`/${sublink}/${res.name.replace(/\.md$/g, "")}`}
/>