import React, { useState, useEffect } from 'react'; import './App.css'; // Componente principal da aplicação React function App() { const [currentSection, setCurrentSection] = useState('home'); const [isVisible, setIsVisible] = useState(false); useEffect(() => { // Animação de entrada setTimeout(() => setIsVisible(true), 100); // Detectar seção atual baseada na URL const path = window.location.pathname; if (path.includes('servicos')) setCurrentSection('services'); else if (path.includes('projetos')) setCurrentSection('projects'); else if (path.includes('sobre')) setCurrentSection('about'); else if (path.includes('contato')) setCurrentSection('contact'); else setCurrentSection('home'); }, []); return (

🚀 SoftEdge Corporation - React Integration

Componentes React integrados com PHP

React + PHP = 💪 Potência Total

); } // Componente de navegação function Navigation({ currentSection, onNavigate }) { const sections = [ { id: 'home', label: 'Início', icon: '🏠' }, { id: 'services', label: 'Serviços', icon: '⚙️' }, { id: 'projects', label: 'Projetos', icon: '📁' }, { id: 'about', label: 'Sobre', icon: '👥' }, { id: 'contact', label: 'Contato', icon: '📧' } ]; return ( ); } // Componente de conteúdo dinâmico function ContentSection({ section }) { const [stats, setStats] = useState(null); const [loading, setLoading] = useState(false); useEffect(() => { if (section === 'stats') { fetchStats(); } }, [section]); const fetchStats = async () => { setLoading(true); try { // Simular chamada para API PHP const response = await fetch('/api.php?r=stats'); const data = await response.json(); setStats(data); } catch (error) { console.error('Erro ao buscar estatísticas:', error); // Dados mock para demonstração setStats({ projects: 70, satisfaction: 4.9, support: '24/7', codeQuality: '100%' }); } setLoading(false); }; const renderContent = () => { switch (section) { case 'home': return (

Bem-vindo à SoftEdge Corporation

Transformamos ideias em soluções digitais de excelência.

🚀

Desenvolvimento Full Stack

Tecnologias modernas para aplicações completas

🤖

IA & Automação

Inteligência artificial para otimizar processos

Performance

Otimização e consultoria especializada

); case 'services': return (

Nossos Serviços

); case 'projects': return (

Projetos em Destaque

); case 'about': return (

Sobre a SoftEdge

Nossa Equipe

Nossa Missão

Transformar ideias em soluções tecnológicas que fazem a diferença no mundo digital.

); case 'contact': return (

Entre em Contato

); default: return (

Seção não encontrada

Selecione uma seção no menu de navegação.

); } }; return (
{renderContent()}
); } // Componentes auxiliares function ServiceCard({ icon, title, description, technologies }) { return (
{icon}

{title}

{description}

{technologies.map(tech => ( {tech} ))}
); } function ProjectCard({ title, description, status, technologies }) { return (

{title}

{status}

{description}

{technologies.map(tech => ( {tech} ))}
); } function TeamMember({ name, role }) { return (
{name.charAt(0)}

{name}

{role}

); } function ContactForm() { const [formData, setFormData] = useState({ name: '', email: '', message: '' }); const [submitted, setSubmitted] = useState(false); const handleSubmit = async (e) => { e.preventDefault(); try { const response = await fetch('/api.php?r=contact', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(formData) }); if (response.ok) { setSubmitted(true); setFormData({ name: '', email: '', message: '' }); } } catch (error) { console.error('Erro ao enviar formulário:', error); } }; const handleChange = (e) => { setFormData({ ...formData, [e.target.name]: e.target.value }); }; if (submitted) { return (

✅ Mensagem enviada com sucesso!

Entraremos em contato em breve.

); } return (