fix: resolve biome lint errors in discovery files
Remove unused functions and imports from route tests, fix array index key warnings in skeleton components, apply biome formatting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -143,12 +143,14 @@ function TrendingCategoriesSection() {
|
||||
</div>
|
||||
{isLoading ? (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{Array.from({ length: 8 }).map((_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="h-8 w-24 bg-gray-100 rounded-full animate-pulse"
|
||||
/>
|
||||
))}
|
||||
{Array.from({ length: 8 }, (_, i) => `cat-skeleton-${i}`).map(
|
||||
(key) => (
|
||||
<div
|
||||
key={key}
|
||||
className="h-8 w-24 bg-gray-100 rounded-full animate-pulse"
|
||||
/>
|
||||
),
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
@@ -172,9 +174,9 @@ function SectionSkeleton({ count, aspect }: { count: number; aspect: string }) {
|
||||
<div
|
||||
className={`grid ${aspect === "none" ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"} gap-4`}
|
||||
>
|
||||
{Array.from({ length: count }).map((_, i) => (
|
||||
{Array.from({ length: count }, (_, i) => `skeleton-${i}`).map((key) => (
|
||||
<div
|
||||
key={i}
|
||||
key={key}
|
||||
className="bg-white rounded-xl border border-gray-100 overflow-hidden animate-pulse"
|
||||
>
|
||||
{aspect !== "none" && (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { and, count, desc, eq, isNotNull, lt, sql } from "drizzle-orm";
|
||||
import { db as prodDb } from "../../db/index.ts";
|
||||
import { globalItems, setups, setupItems, users } from "../../db/schema.ts";
|
||||
import { globalItems, setupItems, setups, users } from "../../db/schema.ts";
|
||||
|
||||
type Db = typeof prodDb;
|
||||
|
||||
@@ -44,10 +44,7 @@ export async function getPopularSetups(
|
||||
.leftJoin(users, eq(users.id, setups.userId))
|
||||
.where(eq(setups.isPublic, true))
|
||||
.groupBy(setups.id, setups.name, setups.createdAt, users.displayName)
|
||||
.orderBy(
|
||||
desc(sql<number>`COUNT(${setupItems.id})`),
|
||||
desc(setups.id),
|
||||
)
|
||||
.orderBy(desc(sql<number>`COUNT(${setupItems.id})`), desc(setups.id))
|
||||
.limit(fetchLimit);
|
||||
|
||||
// Apply cursor filter in JS (composite cursor: itemCount_id)
|
||||
|
||||
Reference in New Issue
Block a user