// Mobile App Component const { useState, useEffect } = React; const MobileApp = () => { const [activeTab, setActiveTab] = useState('home'); const [menuOpen, setMenuOpen] = useState(false); const [languageMenuOpen, setLanguageMenuOpen] = useState(false); const [currentLanguage, setCurrentLanguage] = useState('en'); // Initialize language and add listener for language changes useEffect(() => { // Initialize language if (window.initLanguage) { const initialLang = window.initLanguage(); setCurrentLanguage(initialLang); } // Listen for language changes const handleLanguageChange = (event) => { setCurrentLanguage(event.detail.language); }; document.addEventListener('languageChanged', handleLanguageChange); // Clean up return () => { document.removeEventListener('languageChanged', handleLanguageChange); }; }, []); // Define animation styles const fadeIn = { animation: 'fadeIn 0.5s ease-out forwards', }; const slideUp = { animation: 'slideUp 0.5s ease-out forwards', }; const pulseStyle = { animation: 'pulse 2s infinite', }; // Handle tab change const handleTabChange = (tab) => { setActiveTab(tab); }; // Toggle menu const toggleMenu = () => { setMenuOpen(!menuOpen); }; return (
{/* Improved header with logo and hamburger menu */}
BeAnormal Logo { e.target.onerror = null; e.target.style.display = 'none'; e.target.nextSibling.style.display = 'block'; }} /> BeAnormal
{/* Language Switcher Button */}
setLanguageMenuOpen(true)} > {currentLanguage === 'en' && '🇬🇧'} {currentLanguage === 'es' && '🇪🇸'} {currentLanguage === 'fr' && '🇫🇷'} {currentLanguage === 'tr' && '🇹🇷'} {currentLanguage === 'it' && '🇮🇹'} {currentLanguage === 'ru' && '🇷🇺'} {currentLanguage === 'ar' && '🇸🇦'}
{/* Notifications Button */}
2
{/* Language Switcher Overlay */} {languageMenuOpen && (
setLanguageMenuOpen(false)} style={{ position: 'fixed', top: 0, left: 0, right: 0, bottom: 0, background: 'rgba(0,0,0,0.5)', zIndex: 50, display: 'flex', justifyContent: 'center', alignItems: 'center', ...fadeIn }}>
e.stopPropagation()}> setLanguageMenuOpen(false)} />
)} {/* Menu overlay */} {menuOpen && (
e.stopPropagation()} style={{ position: 'absolute', top: 0, left: 0, width: '80%', maxWidth: '300px', height: '100%', background: 'white', boxShadow: '0 0 20px rgba(0,0,0,0.2)', padding: '20px', transform: 'translateX(-100%)', ...slideUp, animation: 'slideInRight 0.3s forwards' }}>
BeAnormal Logo { e.target.onerror = null; e.target.style.display = 'none'; e.target.nextSibling.style.display = 'inline'; }} /> BeAnormal
MENU
{[ { id: 'home', name: 'Home', icon: 'fa-home' }, { id: 'speed-test', name: 'Speed Test', icon: 'fa-gauge-high' }, { id: 'seo-check', name: 'SEO Check', icon: 'fa-magnifying-glass' }, { id: 'web-scraping', name: 'Web Scraping', icon: 'fa-spider' }, { id: 'security', name: 'Security Test', icon: 'fa-shield-alt', soon: true }, { id: 'api-testing', name: 'API Testing', icon: 'fa-cloud', soon: true } ].map(item => (
!item.soon && handleTabChange(item.id)} style={{ display: 'flex', alignItems: 'center', padding: '12px 16px', borderRadius: '8px', marginBottom: '8px', cursor: 'pointer', background: activeTab === item.id ? '#f3f4f6' : 'transparent', position: 'relative' }} >
{item.name} {item.soon && ( SOON )}
))}
ACCOUNT
{[ { id: 'settings', name: 'Settings', icon: 'fa-cog' }, { id: 'help', name: 'Help & Support', icon: 'fa-question-circle' } ].map(item => (
{item.name}
))}
Upgrade to Pro

Get unlimited tests, advanced features, and priority support.

)}
{activeTab === 'speed-test' && } {activeTab === 'seo-check' && } {activeTab === 'web-scraping' && } {activeTab === 'home' && ( <> {/* Hero Section */}

Web Testing Tools

For developers & marketers

{/* Stats/Numbers Section */}
{[ { label: 'Users', value: '150K+', icon: 'fa-users' }, { label: 'Tests Run', value: '5M+', icon: 'fa-vial' }, { label: 'Countries', value: '120+', icon: 'fa-globe' } ].map((stat, index) => (
{stat.value}
{stat.label}
))}
{/* Tool Cards - 2x2 grid with improved design */}

Popular Tools

{[ { name: 'Web Scraping', description: 'Test scraping with multiple engines', icon: 'fa-spider', color: 'linear-gradient(135deg, #a5b4fc, #6366f1)', id: 'web-scraping' }, { name: 'Speed Test', description: 'Check your connection speed', icon: 'fa-gauge-high', color: 'linear-gradient(135deg, #22d3ee, #0ea5e9)', id: 'speed-test' }, { name: 'SEO Check', description: 'Analyze website SEO score', icon: 'fa-magnifying-glass', color: 'linear-gradient(135deg, #fbbf24, #f97316)', id: 'seo-check' }, { name: 'Security', description: 'Find security issues', icon: 'fa-shield-alt', color: 'linear-gradient(135deg, #a3e635, #16a34a)', id: 'security', soon: true } ].map((tool, index) => (
!tool.soon && handleTabChange(tool.id)} style={{ background: 'white', borderRadius: '16px', padding: '20px', boxShadow: '0 4px 20px rgba(0, 0, 0, 0.05)', display: 'flex', flexDirection: 'column', alignItems: 'center', position: 'relative', overflow: 'hidden', cursor: tool.soon ? 'default' : 'pointer', transition: 'transform 0.2s, box-shadow 0.2s', }} > {tool.soon && (
Soon
)}

{tool.name}

{tool.description}

))}
{/* Features Section */}

Why BeAnormal?

{[ { title: 'Multiple test engines', description: 'Test with Puppeteer, Playwright, Selenium & more', icon: 'fa-code-branch' }, { title: 'Advanced analysis', description: 'Get detailed reports with actionable insights', icon: 'fa-chart-line' }, { title: 'Free to use', description: 'Core features available without cost', icon: 'fa-gift' } ].map((feature, index) => (

{feature.title}

{feature.description}

))}
{/* Pro Section */}

Upgrade to Pro

Get unlimited tests, advanced features, and priority support.

{[ 'Unlimited tests & reports', 'Advanced security scanning', 'Priority support', 'API access' ].map((feature, index) => (
{feature}
))}
)}
{/* Improved bottom navigation */} {/* CSS Animations */}
); }; // Export the component window.MobileApp = MobileApp;