"use client"; import { useEffect, useState } from "react"; import Link from "next/link"; import { useAbout } from "@/lib/hooks/useAbout"; const AboutBanner = () => { const { data, loading, error } = useAbout(); const [currentMetric, setCurrentMetric] = useState(0); useEffect(() => { // Auto-rotate metrics const interval = setInterval(() => { setCurrentMetric(prev => (prev + 1) % 3); }, 4000); return () => clearInterval(interval); }, []); // Show loading state if (loading) { return (
Loading...

Loading about us content...

); } // Show error state if (error) { return (

Error Loading Content

{error}


Please try refreshing the page or contact support if the problem persists.

); } // Use API data or fallback to default content const bannerData = data?.banner; const metrics = [ { value: "8", label: "Industry Verticals", icon: "fa-industry", color: "#3b82f6" }, { value: "99.9%", label: "Uptime SLA", icon: "fa-shield-halved", color: "#10b981" }, { value: "24/7", label: "Enterprise Support", icon: "fa-headset", color: "#f59e0b" }, { value: "5+", label: "Years of Operation", icon: "fa-award", color: "#8b5cf6" } ]; return (
{/* Video-like Background */}
{/* Animated Code Lines */}
const enterprise = 'mission-critical';
if (security.level === 'enterprise') {
  deploy();
}
{/* Floating Tech Icons */}
{/* Enterprise Dashboard Elements */}
Security Status
Enterprise Grade
SLA Response
99.9%
Uptime
Enterprise Clients
500+
Fortune 500
{/* Network Connection Lines */}
{/* Data Flow Particles */}
{/* Background Gradient Overlay */}
{/* Badge */}
Enterprise Security Certified
{/* Main Title */}

{bannerData?.title || "Mission-Critical Software Solutions for Global Enterprises"}

{/* Description */}

{bannerData?.description || "GNX Soft Ltd delivers enterprise-grade software solutions for mission-critical industries with 99.9% uptime SLA and 24/7 dedicated support. Our platforms power digital transformation across Defense & Aerospace, Healthcare, Banking, Telecommunication, and other highly regulated sectors."}

{/* Key Metrics */}
{metrics.map((metric, index) => (
setCurrentMetric(index)} >
{metric.value}
{metric.label}
))}
{/* CTA Buttons */}
View Enterprise Solutions Schedule Consultation
{/* Social Links */}
); }; export default AboutBanner;