diff --git a/Frontend/src/Component/Animation/Appointment.tsx b/Frontend/src/Component/Animation/Appointment.tsx index 8582441..67b6041 100644 --- a/Frontend/src/Component/Animation/Appointment.tsx +++ b/Frontend/src/Component/Animation/Appointment.tsx @@ -1,69 +1,67 @@ import { useState, useEffect } from 'react'; -import image1 from '../../Assets/image (1).jpg' -import image2 from '../../Assets/image (2).jpg' -import image3 from '../../Assets/image.jpg' +import image1 from '../../Assets/image (1).jpg'; +import image2 from '../../Assets/image (2).jpg'; +import image3 from '../../Assets/image.jpg'; import { useNavigate } from 'react-router-dom'; const Appointment = () => { const [currentDoctorIndex, setCurrentDoctorIndex] = useState(0); - - - const navigate = useNavigate(); - - const doctors = [ { id: 1, - name: "Dr. Arjun Sharma", + name: 'Dr. Arjun Sharma', image: image3, - description: "Certified Ayurvedic practitioner with 20+ years of experience in holistic healing and natural therapies.", - specialist: "Ayurvedic Specialist", + description: + 'Certified Ayurvedic practitioner with 20+ years of experience in holistic healing and natural therapies.', + specialist: 'Ayurvedic Specialist', rating: 4.9, - location: "123 Wellness Street, Delhi, India" + location: '123 Wellness Street, Delhi, India', }, { id: 2, - name: "Dr. Meera Kapoor", + name: 'Dr. Meera Kapoor', image: image1, - description: "Expert in Panchakarma therapy and Ayurvedic diet planning for chronic diseases.", - specialist: "Panchakarma Specialist", + description: + 'Expert in Panchakarma therapy and Ayurvedic diet planning for chronic diseases.', + specialist: 'Panchakarma Specialist', rating: 4.8, - location: "456 Ayurveda Avenue, Mumbai, India" + location: '456 Ayurveda Avenue, Mumbai, India', }, { id: 3, - name: "Dr. Rajesh Verma", + name: 'Dr. Rajesh Verma', image: image2, - description: "Specialist in Ayurvedic treatments for skin disorders and natural wellness therapies.", - specialist: "Ayurvedic Dermatologist", + description: + 'Specialist in Ayurvedic treatments for skin disorders and natural wellness therapies.', + specialist: 'Ayurvedic Dermatologist', rating: 4.7, - location: "789 Holistic Lane, Bangalore, India" + location: '789 Holistic Lane, Bangalore, India', }, ]; useEffect(() => { const interval = setInterval(() => { - setCurrentDoctorIndex((prevIndex) => + setCurrentDoctorIndex((prevIndex) => prevIndex === doctors.length - 1 ? 0 : prevIndex + 1 ); }, 10000); - + return () => clearInterval(interval); }, [doctors.length]); const doctor = doctors[currentDoctorIndex]; - const renderStars = (rating) => { + const renderStars = (rating: number) => { const fullStars = Math.floor(rating); const hasHalfStar = rating % 1 >= 0.5; - + return (
{doctor.description}
-