refactor: standardize quotation marks across all files and improve code consistency

This commit is contained in:
Julien Froidefond
2025-11-27 11:40:30 +01:00
parent cc1e8c20a6
commit b2efade4d5
107 changed files with 9471 additions and 5952 deletions

View File

@@ -1,4 +1,4 @@
"use client"
"use client";
import {
ShoppingCart,
@@ -58,86 +58,90 @@ import {
Key,
Refrigerator,
type LucideIcon,
} from "lucide-react"
} from "lucide-react";
// Map icon names to Lucide components
const iconMap: Record<string, LucideIcon> = {
"shopping-cart": ShoppingCart,
"utensils": Utensils,
"croissant": Croissant,
"fuel": Fuel,
"train": Train,
"car": Car,
utensils: Utensils,
croissant: Croissant,
fuel: Fuel,
train: Train,
car: Car,
"car-taxi": Car, // Using Car as fallback for car-taxi
"car-key": Key, // Using Key as fallback
"parking": SquareParking,
"bike": Bike,
"plane": Plane,
"home": Home,
"zap": Zap,
"droplet": Droplet,
"hammer": Hammer,
"sofa": Sofa,
"refrigerator": Refrigerator,
"pill": Pill,
"stethoscope": Stethoscope,
"hospital": Hospital,
"glasses": Glasses,
"dumbbell": Dumbbell,
"sparkles": Sparkles,
"tv": Tv,
"music": Music,
"film": Film,
"gamepad": Gamepad,
"book": Book,
"ticket": Ticket,
"shirt": Shirt,
"smartphone": Smartphone,
"package": Package,
"wifi": Wifi,
"repeat": Repeat,
"landmark": Landmark,
"shield": Shield,
parking: SquareParking,
bike: Bike,
plane: Plane,
home: Home,
zap: Zap,
droplet: Droplet,
hammer: Hammer,
sofa: Sofa,
refrigerator: Refrigerator,
pill: Pill,
stethoscope: Stethoscope,
hospital: Hospital,
glasses: Glasses,
dumbbell: Dumbbell,
sparkles: Sparkles,
tv: Tv,
music: Music,
film: Film,
gamepad: Gamepad,
book: Book,
ticket: Ticket,
shirt: Shirt,
smartphone: Smartphone,
package: Package,
wifi: Wifi,
repeat: Repeat,
landmark: Landmark,
shield: Shield,
"heart-pulse": HeartPulse,
"receipt": Receipt,
receipt: Receipt,
"piggy-bank": PiggyBank,
"banknote": Banknote,
"wallet": Wallet,
banknote: Banknote,
wallet: Wallet,
"hand-coins": HandCoins,
"undo": Undo,
"coins": Coins,
"bed": Bed,
"luggage": Luggage,
undo: Undo,
coins: Coins,
bed: Bed,
luggage: Luggage,
"graduation-cap": GraduationCap,
"baby": Baby,
baby: Baby,
"paw-print": PawPrint,
"wrench": Wrench,
wrench: Wrench,
"heart-handshake": HeartHandshake,
"gift": Gift,
"cigarette": Cigarette,
gift: Gift,
cigarette: Cigarette,
"arrow-right-left": ArrowRightLeft,
"help-circle": HelpCircle,
"tag": Tag,
"folder": Folder,
}
tag: Tag,
folder: Folder,
};
// Get all available icon names
export const availableIcons = Object.keys(iconMap)
export const availableIcons = Object.keys(iconMap);
// Get the icon component by name
export function getIconComponent(iconName: string): LucideIcon {
return iconMap[iconName] || Tag
return iconMap[iconName] || Tag;
}
interface CategoryIconProps {
icon: string
color?: string
className?: string
size?: number
icon: string;
color?: string;
className?: string;
size?: number;
}
export function CategoryIcon({ icon, color, className, size = 20 }: CategoryIconProps) {
const IconComponent = getIconComponent(icon)
return <IconComponent className={className} style={{ color }} size={size} />
export function CategoryIcon({
icon,
color,
className,
size = 20,
}: CategoryIconProps) {
const IconComponent = getIconComponent(icon);
return <IconComponent className={className} style={{ color }} size={size} />;
}