import { useState, useEffect } from "react"; import { data } from "./data"; export default function BusinessSolution() { const [activeTab, setActiveTab] = useState("hr"); const activeContent = data.content[activeTab]; const [isMobile, setIsMobile] = useState(false); // Detect mobile screen size useEffect(() => { const handleResize = () => { setIsMobile(window.innerWidth < 768); // Set true jika lebar layar < 768px }; window.addEventListener("resize", handleResize); handleResize(); // Inisialisasi state saat pertama kali mount return () => window.removeEventListener("resize", handleResize); }, []); return (
{/* Header */}

{data.title}

{data.subtitle}

{/* Navigation Buttons */}
{data.tabs.map((button) => ( ))}
{/* Content Section */} {activeContent && (
{/* Image Section */}
{activeContent.title}
{/* Text Content */}

{activeContent.title}

{activeContent.description}

{/* Features */}
{activeContent.features.map((feature, index) => (
Feature Icon

{feature.title}

{feature.description}

))}
)}
); }