From fa3588d6192f36e4248674c01a308f5114056e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Tue, 18 Nov 2025 08:03:36 +0100 Subject: [PATCH] fix: move useMemo before early return to fix React hooks order --- components/effects/EffectBrowser.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/effects/EffectBrowser.tsx b/components/effects/EffectBrowser.tsx index a4a7fa8..2cc3a44 100644 --- a/components/effects/EffectBrowser.tsx +++ b/components/effects/EffectBrowser.tsx @@ -26,8 +26,6 @@ export function EffectBrowser({ open, onClose, onSelectEffect }: EffectBrowserPr const [search, setSearch] = React.useState(''); const [selectedCategory, setSelectedCategory] = React.useState(null); - if (!open) return null; - const handleSelectEffect = (effectType: EffectType) => { onSelectEffect(effectType); onClose(); @@ -53,6 +51,8 @@ export function EffectBrowser({ open, onClose, onSelectEffect }: EffectBrowserPr return filtered; }, [search]); + if (!open) return null; + return (