Files
sase.tr/apps/web/src/lib/category-icons.ts
Sase Dev 3184e4c619 style: apply biome safe auto-fixes
Run 'biome check --fix' on apps/api/src and apps/web/src to clear
the safe-fixable lint backlog (151 files: parseInt → Number.parseInt,
isNaN → Number.isNaN, organize imports, etc.). 769 errors remain
that require manual changes (mostly noExplicitAny).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 16:13:56 +00:00

45 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import {
Car,
CircleDot,
Cog,
Droplets,
FileText,
FlaskConical,
Footprints,
type LucideIcon,
Package,
Settings,
Shield,
Wind,
Wrench,
Zap,
} from "lucide-react";
const iconRules: [RegExp, LucideIcon][] = [
[/motor|engine/i, Cog],
[/şanzıman|vites|transmission|getriebe/i, Settings],
[/ön aks|direksiyon|steering|lenkung/i, CircleDot],
[/arka aks|rear axle|hinterachse/i, CircleDot],
[/tekerlek|fren|brake|wheel|rad|brems/i, Shield],
[/elektrik|electri/i, Zap],
[/yakıt|fuel|kraftstoff/i, Droplets],
[/egzoz|exhaust|abgas/i, Wind],
[/soğutma|cool|kühl/i, Wind],
[/kaporta|body|karosserie/i, Car],
[/pedal/i, Footprints],
[/aşınma|wear|verschleiß/i, Wrench],
[/servis|service/i, Wrench],
[/aksesuar|accessor|zubehör/i, Package],
[/kimyasal|chemical|chemie/i, FlaskConical],
[/msp sayfa|v sayfa/i, FileText],
];
export function getCategoryIcon(name: string): LucideIcon {
for (const [pattern, icon] of iconRules) {
if (pattern.test(name)) {
return icon;
}
}
return Wrench;
}