From 6ef6137fc86495ac8ce4048c6ae281d38d800fdf Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 5 Aug 2025 22:56:02 +0000 Subject: [PATCH] Add loading state and enhanced animations to homepage cgen-dc185ee6fbe540c598ee52854dd90a40 --- client/pages/Index.tsx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/client/pages/Index.tsx b/client/pages/Index.tsx index c8ce21d0..62549727 100644 --- a/client/pages/Index.tsx +++ b/client/pages/Index.tsx @@ -21,6 +21,30 @@ import { } from "lucide-react"; export default function Index() { + const [isLoading, setIsLoading] = useState(true); + const [statsVisible, setStatsVisible] = useState(false); + const [pathsVisible, setPathsVisible] = useState(false); + + useEffect(() => { + const timer = setTimeout(() => { + setIsLoading(false); + }, 1500); + + const statsTimer = setTimeout(() => { + setStatsVisible(true); + }, 2000); + + const pathsTimer = setTimeout(() => { + setPathsVisible(true); + }, 2500); + + return () => { + clearTimeout(timer); + clearTimeout(statsTimer); + clearTimeout(pathsTimer); + }; + }, []); + const stats = [ { value: "3", label: "Subsidiaries", icon: Target }, { value: "1M+", label: "Community Members", icon: Users },