From 3a7aa82ff7fe2f604b56d52aae11e87de3eb2aef Mon Sep 17 00:00:00 2001 From: Emre Date: Fri, 24 Oct 2025 02:17:33 +0300 Subject: [PATCH] improvements --- package-lock.json | 10 ++ package.json | 1 + src/App.tsx | 2 + src/components/AnimatedSection.tsx | 24 +-- src/components/ContactForm.tsx | 220 ++++++++++++++++++++++++++ src/components/FadeIn.tsx | 5 +- src/components/Footer.tsx | 6 +- src/components/Header.tsx | 12 +- src/components/ui/FadeIn.tsx | 5 +- src/components/ui/floating-navbar.tsx | 2 +- src/pages/agents/AgentsHero.tsx | 125 +++++++++++++++ src/pages/agents/AgentsPage.tsx | 22 +-- src/pages/agents/BentoSection.tsx | 16 +- src/pages/agents/Companies.tsx | 7 +- src/pages/agents/DeploySection.tsx | 49 +++--- src/pages/cloud/CloudCTA.tsx | 44 +++--- src/pages/cloud/CloudHero.tsx | 15 +- src/pages/cloud/CloudOverview.tsx | 6 +- src/pages/cloud/SecurityPillars.tsx | 2 +- src/pages/download/DevHub.tsx | 69 ++++++++ src/pages/download/DownloadHero.tsx | 104 ++++++++++++ src/pages/download/DownloadPage.tsx | 17 ++ src/pages/home/CallToAction.tsx | 11 +- src/pages/home/HomeAgent.tsx | 2 +- src/pages/home/HomeAurora.tsx | 56 +++---- src/pages/home/HomeBenefits.tsx | 42 +++-- src/pages/home/HomeGlobe.tsx | 36 +++-- src/pages/home/HomeHero.tsx | 36 ----- src/pages/home/HomeHeroDark.tsx | 35 ---- src/pages/home/HomeHeroLight2.tsx | 69 -------- src/pages/home/StackSection.tsx | 6 +- src/pages/home/WorldMapSection.tsx | 106 ------------- src/pages/network/CallToAction.tsx | 2 +- src/pages/network/Hero.tsx | 18 +-- 34 files changed, 740 insertions(+), 442 deletions(-) create mode 100644 src/components/ContactForm.tsx create mode 100644 src/pages/agents/AgentsHero.tsx create mode 100644 src/pages/download/DevHub.tsx create mode 100644 src/pages/download/DownloadHero.tsx create mode 100644 src/pages/download/DownloadPage.tsx delete mode 100644 src/pages/home/HomeHero.tsx delete mode 100644 src/pages/home/HomeHeroDark.tsx delete mode 100644 src/pages/home/HomeHeroLight2.tsx delete mode 100644 src/pages/home/WorldMapSection.tsx diff --git a/package-lock.json b/package-lock.json index a22b0ba..02ae8a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "www_try", "version": "0.0.0", "dependencies": { + "@emailjs/browser": "^4.4.1", "@headlessui/react": "^2.2.9", "@heroicons/react": "^2.2.0", "@lobehub/icons": "^1.97.2", @@ -612,6 +613,15 @@ "react": ">=16.8.0" } }, + "node_modules/@emailjs/browser": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@emailjs/browser/-/browser-4.4.1.tgz", + "integrity": "sha512-DGSlP9sPvyFba3to2A50kDtZ+pXVp/0rhmqs2LmbMS3I5J8FSOgLwzY2Xb4qfKlOVHh29EAutLYwe5yuEZmEFg==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@emnapi/core": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.6.0.tgz", diff --git a/package.json b/package.json index d1c5371..b44e8b8 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@emailjs/browser": "^4.4.1", "@headlessui/react": "^2.2.9", "@heroicons/react": "^2.2.0", "@lobehub/icons": "^1.97.2", diff --git a/src/App.tsx b/src/App.tsx index 9c7d1d1..78044f1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import HomePage from './pages/home/HomePage' import CloudPage from './pages/cloud/CloudPage' import NetworkPage from './pages/network/NetworkPage' import AgentsPage from './pages/agents/AgentsPage' +import DownloadPage from './pages/download/DownloadPage' function App() { return ( @@ -14,6 +15,7 @@ function App() { } /> } /> } /> + } /> diff --git a/src/components/AnimatedSection.tsx b/src/components/AnimatedSection.tsx index 067e5c4..d5a0864 100644 --- a/src/components/AnimatedSection.tsx +++ b/src/components/AnimatedSection.tsx @@ -1,20 +1,20 @@ -import { useRef } from 'react' -import { motion, useInView } from 'framer-motion' +import { motion } from 'framer-motion' -export function AnimatedSection({ children, id }: { children: React.ReactNode; id?: string }) { - const ref = useRef(null) - const isInView = useInView(ref, { once: true, margin: '-20% 0px -20% 0px' }) +type AnimatedSectionProps = { + children: React.ReactNode + id?: string + className?: string +} +export function AnimatedSection({ children, id, className }: AnimatedSectionProps) { return ( {children} diff --git a/src/components/ContactForm.tsx b/src/components/ContactForm.tsx new file mode 100644 index 0000000..b4f8a67 --- /dev/null +++ b/src/components/ContactForm.tsx @@ -0,0 +1,220 @@ +'use client' + +import { AnimatePresence, motion } from 'framer-motion' +import { useState, type ChangeEvent, type FormEvent } from 'react' +import emailjs from '@emailjs/browser' +import { CheckCircle, Send, X } from 'lucide-react' + +interface ContactFormProps { + isOpen: boolean + onClose: () => void + title?: string + formType?: 'investor' | 'partner' | 'agent_waitlist' +} + +const initialFormState = { + name: '', + email: '', + company: '', + message: '', +} + +export default function ContactForm({ + isOpen, + onClose, + title = 'Book a Meeting', + formType, +}: ContactFormProps) { + const [formData, setFormData] = useState(initialFormState) + const [isSubmitting, setIsSubmitting] = useState(false) + const [isSubmitted, setIsSubmitted] = useState(false) + + const handleInputChange = (e: ChangeEvent) => { + const { name, value } = e.target + setFormData((prev) => ({ + ...prev, + [name]: value, + })) + } + + const handleSubmit = async (e: FormEvent) => { + e.preventDefault() + setIsSubmitting(true) + + try { + const templateParams = { + from_name: formData.name, + from_email: formData.email, + company: formData.company, + message: formData.message, + to_email: 'emre@incubaid.com', + form_type: formType || 'General Inquiry', + } + + await emailjs.send( + 'service_03d0vf8', + 'template_6o6e8oe', + templateParams, + 'bhkly3gzrO-SA9w7v', + ) + + setIsSubmitted(true) + setTimeout(() => { + setIsSubmitted(false) + setFormData(initialFormState) + onClose() + }, 3000) + } catch (error) { + console.error('Email sending failed:', error) + alert('Failed to send message. Please try again.') + } finally { + setIsSubmitting(false) + } + } + + return ( + + {isOpen && ( + + +
+

{title}

+ +
+ +
+ {isSubmitted ? ( + + +

Thank you!

+

We'll get back to you soon.

+
+ ) : ( +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +