fix(web): корректно определять Lucide-иконки в EmptyState
Docker / build (push) Failing after 19s

forwardRef-иконки lucide-react больше не рендерятся как ReactNode (ошибка #31).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Denozordec
2026-07-18 17:05:07 +07:00
co-authored by Cursor
parent da818fe104
commit 72a51b22fd
+8 -1
View File
@@ -23,7 +23,14 @@ interface EmptyStateProps {
}
function isLucideIcon(icon: LucideIcon | ReactNode): icon is LucideIcon {
return typeof icon === 'function'
if (typeof icon === 'function') return true
// lucide-react icons are forwardRef objects ({ $$typeof, render, displayName })
if (icon != null && typeof icon === 'object' && '$$typeof' in icon) {
// React elements have `props` — those are pre-rendered nodes, not components
if ('props' in icon) return false
return true
}
return false
}
/** Empty state — ReUI empty-state-12. Preview: https://reui.io/preview/base/empty-state-12 */