fix(29-02): lint fixes for GearImage integration

Fix unused parameter warning and formatting issues across all
updated components.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-12 20:02:38 +02:00
parent 66d9c4157b
commit 9636033361
10 changed files with 169 additions and 34 deletions

View File

@@ -95,10 +95,7 @@ export function CandidateListItem({
}}
>
{candidate.imageUrl ? (
<GearImage
src={candidate.imageUrl}
alt={candidate.name}
/>
<GearImage src={candidate.imageUrl} alt={candidate.name} />
) : (
<LucideIcon
name={candidate.categoryIcon}

View File

@@ -631,15 +631,13 @@ function GridCard({ item, onAdd, onCardClick, weight, price }: CardProps) {
className="aspect-[4/3] overflow-hidden"
style={{
backgroundColor: item.imageUrl
? ((item as Record<string, unknown>).dominantColor as string) || "#f3f4f6"
? ((item as Record<string, unknown>).dominantColor as string) ||
"#f3f4f6"
: undefined,
}}
>
{item.imageUrl ? (
<GearImage
src={item.imageUrl}
alt={`${item.brand} ${item.model}`}
/>
<GearImage src={item.imageUrl} alt={`${item.brand} ${item.model}`} />
) : (
<div className="w-full h-full bg-gray-50 flex items-center justify-center">
<svg
@@ -707,15 +705,13 @@ function ListRow({ item, onAdd, onCardClick, weight, price }: CardProps) {
className="w-12 h-12 rounded-lg shrink-0 overflow-hidden"
style={{
backgroundColor: item.imageUrl
? ((item as Record<string, unknown>).dominantColor as string) || "#f3f4f6"
? ((item as Record<string, unknown>).dominantColor as string) ||
"#f3f4f6"
: undefined,
}}
>
{item.imageUrl ? (
<GearImage
src={item.imageUrl}
alt={`${item.brand} ${item.model}`}
/>
<GearImage src={item.imageUrl} alt={`${item.brand} ${item.model}`} />
) : (
<div className="w-full h-full bg-gray-50 flex items-center justify-center">
<svg

View File

@@ -119,15 +119,13 @@ export function ComparisonTable({
className="w-12 h-12 rounded-lg overflow-hidden flex items-center justify-center"
style={{
backgroundColor: c.imageUrl
? ((c as Record<string, unknown>).dominantColor as string) || "#f3f4f6"
? ((c as Record<string, unknown>).dominantColor as string) ||
"#f3f4f6"
: undefined,
}}
>
{c.imageUrl ? (
<GearImage
src={c.imageUrl}
alt={c.name}
/>
<GearImage src={c.imageUrl} alt={c.name} />
) : (
<LucideIcon
name={c.categoryIcon}

View File

@@ -12,7 +12,7 @@ interface GearImageProps {
export function GearImage({
src,
alt,
dominantColor,
dominantColor: _dominantColor,
cropZoom,
cropX,
cropY,

View File

@@ -1,12 +1,12 @@
import { Link } from "@tanstack/react-router";
import { useEffect, useState } from "react";
import { GearImage } from "./GearImage";
import {
useGlobalItem,
useGlobalItems,
useLinkItem,
useUnlinkItem,
} from "../hooks/useGlobalItems";
import { GearImage } from "./GearImage";
interface LinkToGlobalItemProps {
itemId: number;
@@ -179,11 +179,7 @@ export function LinkToGlobalItem({
>
{item.imageUrl ? (
<div className="w-8 h-8 rounded overflow-hidden shrink-0">
<GearImage
src={item.imageUrl}
alt=""
cover
/>
<GearImage src={item.imageUrl} alt="" cover />
</div>
) : (
<div className="w-8 h-8 rounded bg-gray-100 shrink-0" />

View File

@@ -547,10 +547,7 @@ function GlobalItemListRow({ item, weight, price }: ListRowProps) {
}}
>
{item.imageUrl ? (
<GearImage
src={item.imageUrl}
alt={`${item.brand} ${item.model}`}
/>
<GearImage src={item.imageUrl} alt={`${item.brand} ${item.model}`} />
) : (
<div className="w-full h-full bg-gray-50 flex items-center justify-center">
<svg