From f128b2964bc34e28ea2745d4b22a16f5e93568f5 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 28 Sep 2025 06:36:49 +0000 Subject: [PATCH] fix: use precomputed particles in JSX cgen-3358facc1915438d805a37583fb56e5f --- client/pages/Onboarding.tsx | 42 +++++++++++++------------------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/client/pages/Onboarding.tsx b/client/pages/Onboarding.tsx index 868add57..57745f60 100644 --- a/client/pages/Onboarding.tsx +++ b/client/pages/Onboarding.tsx @@ -315,34 +315,20 @@ export default function Onboarding() { {/* Floating particles effect (performance-friendly) */} - {(() => { - const particles = useMemo( - () => - Array.from({ length: 8 }).map(() => ({ - left: `${Math.floor(Math.random() * 100)}%`, - top: `${Math.floor(Math.random() * 100)}%`, - delay: `${Math.random().toFixed(2)}s`, - duration: `${3 + Math.floor(Math.random() * 2)}s`, - })), - [], - ); - return ( -
- {particles.map((p, i) => ( -
- ))} -
- ); - })()} +
+ {particles.map((p, i) => ( +
+ ))} +