From f7dcd20267bc6aeb2d7f5b5ce2c34ae8406181bd Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 09:01:56 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 130 +++++++++++++++++++++++++++-------------------- 1 file changed, 75 insertions(+), 55 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 41c6139..9c50026 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -8,23 +8,33 @@ import FeatureCardTwentySeven from '@/components/sections/feature/FeatureCardTwe import TestimonialCardThirteen from '@/components/sections/testimonial/TestimonialCardThirteen'; import ContactSplit from '@/components/sections/contact/ContactSplit'; import FooterBase from '@/components/sections/footer/FooterBase'; -import { Calendar, Heart, Quote, Shield, Smile, Sparkles, Star, Phone, MessageCircle } from 'lucide-react'; +import { Heart, Quote, Shield, Smile, Sparkles, Star, MessageCircle, Brain } from 'lucide-react'; import { useState } from 'react'; export default function LandingPage() { - const [bookingOption, setBookingOption] = useState<'calendly' | 'call' | 'whatsapp' | null>(null); + const [chatOpen, setChatOpen] = useState(false); + const [chatMessages, setChatMessages] = useState>([]); + const [inputValue, setInputValue] = useState(''); - const handleBookingClick = (option: 'calendly' | 'call' | 'whatsapp') => { - setBookingOption(option); - if (option === 'calendly') { - // Open Calendly integration - window.open('https://calendly.com', '_blank'); - } else if (option === 'call') { - // Trigger phone call - window.location.href = 'tel:+919068808583'; - } else if (option === 'whatsapp') { - // Open WhatsApp chat - window.open('https://wa.me/919068808583?text=Hello%20Dr.%20Fauzdar%27s%20Dental', '_blank'); + const handleSendMessage = () => { + if (inputValue.trim()) { + const newMessages = [ + ...chatMessages, + { role: 'user', content: inputValue } + ]; + setChatMessages(newMessages); + setInputValue(''); + + // Simulate AI response + setTimeout(() => { + const responses = [ + "I'd be happy to help you book an appointment! What date and time work best for you?", "Our available time slots are 9 AM - 1 PM and 3 PM - 7 PM. Which suits you?", "Perfect! I've noted your preferences. Can you share your name and phone number?", "Great! Your appointment is confirmed. We'll send you a reminder via SMS." + ]; + setChatMessages(prev => [ + ...prev, + { role: 'assistant', content: responses[Math.floor(Math.random() * responses.length)] } + ]); + }, 500); } }; @@ -139,51 +149,61 @@ export default function LandingPage() {
-

Advanced Booking System

-

Choose your preferred way to book an appointment

+
+ +
+

AI Booking Assistant

+

Chat with our intelligent assistant to book your appointment instantly

-
- {/* Calendly Integration */} -
handleBookingClick('calendly')}> -
- +
+
+ {/* Chat Container */} +
+
+
+

👋 Hello! I'm your dental booking assistant. How can I help you schedule an appointment today?

+
+
+ + {chatMessages.map((msg, idx) => ( +
+
+

{msg.content}

+
+
+ ))} +
+ + {/* Input Area */} +
+
+ setInputValue(e.target.value)} + onKeyPress={(e) => e.key === 'Enter' && handleSendMessage()} + placeholder="Type your message..." + className="flex-1 px-4 py-2 bg-background border border-accent/30 rounded-lg text-foreground placeholder-foreground/50 focus:outline-none focus:border-primary-cta/50" + /> + +
-

Book via Calendly

-

- Choose your preferred date and time from our interactive calendar. Instant confirmation. -

-
- - {/* Call Now */} -
handleBookingClick('call')}> -
- -
-

Call Now

-

- Speak directly with our team. Available during business hours for immediate assistance. + +

+

+ Our AI assistant will help you find the perfect appointment time and collect your information.

- -
- - {/* WhatsApp Chat */} -
handleBookingClick('whatsapp')}> -
- -
-

WhatsApp Chat

-

- Quick messaging service. Get instant replies and appointment confirmations via WhatsApp. -

-
@@ -270,7 +290,7 @@ export default function LandingPage() {
); -} +} \ No newline at end of file -- 2.49.1