"use client"; import React from "react"; function MainComponent() { const [hoveredButton, setHoveredButton] = React.useState(null); const [navigationError, setNavigationError] = React.useState(null); const handleNavigation = (url, featureName) => { try { setNavigationError(null); // Check if the URL is valid if (!url || typeof url !== "string") { throw new Error(`Invalid URL for ${featureName}`); } // Try to navigate window.location.href = url; // Set a timeout to catch navigation failures setTimeout(() => { // If we're still on the same page after 3 seconds, navigation might have failed if (window.location.pathname === "/") { setNavigationError( `Unable to navigate to ${featureName}. Please try again.` ); } }, 3000); } catch (error) { console.error(`Navigation error for ${featureName}:`, error); setNavigationError( `Failed to open ${featureName}. Please try again or check your connection.` ); } }; const navigateToJasperito = () => { handleNavigation("/jasperito-101", "Jasperito101 AI"); }; const features = [ { id: "jasperito", title: "Jasperito101 AI", subtitle: "Elite AI Assistant - Unlimited Daily Use", description: "Your clever digital companion with swagger. Get help with anything from Year 1 to PhD level - math, science, history, coding, creative writing, and more. No limits, no caps, just pure AI power.", icon: "🤖", action: navigateToJasperito, available: true, }, { id: "image-generator", title: "Jasperito101 Image Generator", subtitle: "Unlimited Visual Creation", description: "Turn any wild idea into stunning visuals. From 'purple elephant on Mars' to professional logos - unlimited generations, zero restrictions, pure creative freedom.", icon: "🎨", action: () => handleNavigation("/image-generator", "Image Generator"), available: true, }, { id: "translator", title: "Jasperito101 Language Translator", subtitle: "Smart Cultural Translation", description: "Translate with style and context intact. Keeps slang, tone, and cultural nuances perfect. 13+ languages, unlimited translations, native-level accuracy.", icon: "🌍", action: () => handleNavigation("/translator", "Language Translator"), available: true, }, ]; return (
{/* Navigation Error Banner */} {navigationError && (
{navigationError}
)} {/* Header */}

Welcome to Jasperito101

Your AI-Powered Digital Toolkit

Explore powerful AI tools designed to enhance your learning, creativity, and communication

{/* Main Content */}
{/* Features Grid */}
{features.map((feature) => (
setHoveredButton(feature.id)} onMouseLeave={() => setHoveredButton(null)} onClick={feature.action} > {/* Card Background */}
{/* Animated Background Pattern */}
{/* Content */}
{feature.icon}

{feature.title}

{feature.subtitle}

{feature.description}

{/* Status Badge */}
{feature.available ? "Available Now" : "Coming Soon"}
{/* Hover Glow Effect */}
))}
{/* Bottom Section */}

Ready to Get Started?

Choose any tool above to begin your AI-powered journey. Each tool is designed to make your tasks easier, faster, and more efficient.

✨ Powered by Advanced AI Technology
🚀 Fast & Reliable Performance
🔒 Secure & Private
); } export default MainComponent;