import React, { useEffect, useState } from 'react'; import { motion } from 'framer-motion'; import { Link } from 'react-router-dom'; import { Shield, Brain, Users, Lock, Zap, Heart, MessageSquare, Lightbulb, Globe, Code, Share2, DollarSign } from 'lucide-react'; import HeroSection from '../components/HeroSection'; import Section from '../components/Section'; import FeatureCard from '../components/FeatureCard'; import { Button } from '@/components/ui/button'; import matter from 'gray-matter'; // Import images import networkImage from '../assets/discover.jpg'; // Connected lines import heartTechImage from '../assets/heart.jpg'; // Technology heart import humanConnectionImage from '../assets/myherozoom.png'; // Digital human connection import privacyImage from '../assets/share.jpg'; // Digital privacy import transactImage from '../assets/transact.jpg'; // Digital transaction import developImage from '../assets/develop.jpg'; // Development scene import communicateImage from '../assets/communicate.jpg'; // Communication scene // Use Vite's import.meta.glob to import all home content markdown files and images const homeModules = import.meta.glob('../content/home/*.md', { as: 'raw', eager: true }); const imageModules = import.meta.glob('../assets/*.jpg', { eager: true, import: 'default' }); const iconComponents = { Shield, Brain, Users, Lock, Zap, Heart, MessageSquare, Lightbulb, Globe, Code, Share2, DollarSign }; const Home = () => { const [homeContent, setHomeContent] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { const loadHomeContent = async () => { try { const loadedHomeContent = []; for (const path in homeModules) { const content = homeModules[path]; const { data: frontmatter } = matter(content); const IconComponent = iconComponents[frontmatter.iconname]; const imagePath = `../assets/${frontmatter.image}`; // Construct full path const importedImage = imageModules[imagePath]; loadedHomeContent.push({ icon: IconComponent ? : , // Default icon title: frontmatter.title, description: frontmatter.description, image: importedImage, order: frontmatter.order || 999, slug: frontmatter.slug || frontmatter.title.toLowerCase().replace(/\s+/g, '-') }); } // Sort by order loadedHomeContent.sort((a, b) => a.order - b.order); setHomeContent(loadedHomeContent); } catch (error) { console.error('Error loading home content:', error); } finally { setLoading(false); } }; loadHomeContent(); }, []); const benefits = [ "Your memory can never be lost, stolen, or corrupted", "Authentic information flow between real, verified people", "Equal access to knowledge and collaboration", "Enhanced personal productivity with local AI support", "Legal identity and digital autonomy through sovereign zones", "Full control of your assets and data — for you and your children" ]; return (
{/* Hero Section */} Your Personal Agent } description="HERO is not just another app — it's your trusted digital extension that works for you and no one else. Own your data, decide who accesses what, and preserve your memory in a way that can never be corrupted, lost, or hacked." showVideo={true} videoEmbed={