diff --git a/frontend/components/PackageHit.tsx b/frontend/components/PackageHit.tsx index 072514c3..5c635eb3 100644 --- a/frontend/components/PackageHit.tsx +++ b/frontend/components/PackageHit.tsx @@ -1,48 +1,59 @@ // Copyright 2024 the JSR authors. All rights reserved. MIT license. import type { OramaPackageHit } from "../util.ts"; -import type { Package } from "../utils/api_types.ts"; +import type { Package, RuntimeCompat } from "../utils/api_types.ts"; import { getScoreBgColorClass } from "../utils/score_ring_color.ts"; import type { ListDisplayItem } from "./List.tsx"; import { RuntimeCompatIndicator } from "./RuntimeCompatIndicator.tsx"; +const runtimeCompatExists = (compat: RuntimeCompat) => { + return compat?.browser || compat?.deno || compat?.node || compat?.workerd || + compat?.bun; +}; + export function PackageHit(pkg: OramaPackageHit | Package): ListDisplayItem { return { href: `/@${pkg.scope}/${pkg.name}`, - parentClass: ("isArchived" in pkg && pkg.isArchived) - ? "bg-red-100" - : undefined, content: (