import { useEffect, useState } from "react"; import { FaMicrochip, FaCode, FaNetworkWired, FaAtom } from "react-icons/fa"; export const AppLoader = () => { const [progress, setProgress] = useState(0); const [phase, setPhase] = useState(0); useEffect(() => { const phases = [ { progress: 25, delay: 400 }, { progress: 50, delay: 300 }, { progress: 75, delay: 400 }, { progress: 100, delay: 300 }, ]; let timeouts: NodeJS.Timeout[] = []; let currentDelay = 0; phases.forEach((p, i) => { currentDelay += p.delay; timeouts.push( setTimeout(() => { setProgress(p.progress); setPhase(i); }, currentDelay), ); }); return () => timeouts.forEach(clearTimeout); }, []); return (
{/* Background grid effect */}
{/* Glowing orbs */}
{/* Main content */}
{/* Logo with animation */}

HellreigN

{/* Loading icons animation */}
{[ { icon: FaMicrochip, delay: "0s" }, { icon: FaNetworkWired, delay: "0.2s" }, { icon: FaCode, delay: "0.4s" }, ].map(({ icon: Icon, delay }, i) => (
= i ? "rgba(59, 130, 246, 0.6)" : "rgba(255,255,255,0.1)" }`, display: "flex", alignItems: "center", justifyContent: "center", backgroundColor: phase >= i ? "rgba(59, 130, 246, 0.1)" : "transparent", animation: `iconPop 0.5s ease-out ${delay} both`, transition: "all 0.3s ease", }} > = i ? "#3b82f6" : "#555", transition: "color 0.3s ease", }} />
))}
{/* Progress bar */}
{/* Status text */}
{phase === 0 && "INITIALIZING CORE..."} {phase === 1 && "LOADING AGENTS..."} {phase === 2 && "ESTABLISHING CONNECTIONS..."} {phase === 3 && "READY"}
{/* CSS Animations */}
); };