Skip to content

LOW: Frontend — dynamic lucide-react icon lookup has no type safety #869

Description

@ExcelDsigN-tech

File: frontend/src/components/ui/Icon.tsx

Description
Dynamic lucide-react icon lookup provides no compile-time safety:

lucide-react[name as keyof typeof import("lucide-react")]

A typo in an icon name (e.g., "Settins" instead of "Settings") will silently render nothing (undefined).

Severity: Low
Category: Quality

Suggested Fix: Create a typed icon mapping (e.g., type IconName = "Settings" | "User" | ...) and use a switch/object map instead of dynamic lookup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend Next.js / React coderefactorCode quality or structural improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions