From 72a51b22fdf54a0559c197e33886c5e1bcbb9906 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Sat, 18 Jul 2026 17:05:07 +0700 Subject: [PATCH] =?UTF-8?q?fix(web):=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=D0=BD=D0=BE=20=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D1=8F=D1=82=D1=8C=20Lucide-=D0=B8=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B2=20EmptyState?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit forwardRef-иконки lucide-react больше не рендерятся как ReactNode (ошибка #31). Co-authored-by: Cursor --- apps/web/src/components/empty-state.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/empty-state.tsx b/apps/web/src/components/empty-state.tsx index 6f8bc87..37712fb 100644 --- a/apps/web/src/components/empty-state.tsx +++ b/apps/web/src/components/empty-state.tsx @@ -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 */