Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemashree21 authored May 21, 2024
2 parents c255f86 + d5f4bf1 commit 7b7bded
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 4 deletions.
Binary file added public/assets/ourstory.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions src/Pages/AboutPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import anytimehover from '../../public/assets/anytimehover.png'
import career from '../../public/assets/nursecareer.png'
import careerhover from '../../public/assets/nursecareerhover.png'
import BackBtn from "../components/BackBtn/BackBtn";
import ourstory from '../../public/assets/ourstory.jpg'
import "../styles/AboutPage.css"

const AboutPage = () => {
Expand Down Expand Up @@ -48,10 +49,7 @@ const AboutPage = () => {
</h5>
<div className="flex justify-center flex-wrap-reverse gap-4 text-center sm:px-28">
<div className="">
{/* <img src="/assets/mission.svg" width={250} height={250} /> */}
<video width="400" height="400" controls>
<source src="./Videos/video1.mp4" type="video/mp4" />
</video>
<img src={ourstory} width={400} height={400} />
</div>
<div className="flex flex-col justify-center items-center">
<p className="text-left w-full max-w-96 text-base">
Expand Down
82 changes: 82 additions & 0 deletions src/components/Testimonials/Testimonials.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import React, { useState, useEffect } from 'react';
import { FaChevronLeft, FaChevronRight } from 'react-icons/fa';
import testimonials from './testimonials';

function Testimonials() {
const [currentIndex, setCurrentIndex] = useState(0);
const [isSmallScreen, setIsSmallScreen] = useState(false);
const itemsPerPage = isSmallScreen ? 1 : 3;

useEffect(() => {
const checkScreenSize = () => {
setIsSmallScreen(window.innerWidth < 768);
};

checkScreenSize();
window.addEventListener('resize', checkScreenSize);

return () => window.removeEventListener('resize', checkScreenSize);
}, []);

const handleNext = () => {
setCurrentIndex((prevIndex) => (prevIndex + 1) % testimonials.length);
};

const handlePrev = () => {
setCurrentIndex((prevIndex) => (prevIndex - 1 + testimonials.length) % testimonials.length);
};

const getVisibleTestimonials = () => {
const end = currentIndex + itemsPerPage;
if (end > testimonials.length) {
return [...testimonials.slice(currentIndex), ...testimonials.slice(0, end - testimonials.length)];
}
return testimonials.slice(currentIndex, end);
};

return (
<div className='mb-9 flex flex-col gap-4 px-[2rem] md:px-[6.5rem]'>
<div className='text-2xl font-bold text-black text-center'>
What Our Users Say
</div>
<div className='relative w-full flex justify-center items-center'>
<div className='absolute left-[-30px] top-1/2 transform -translate-y-1/2'>
<button
onClick={handlePrev}
className='bg-transparent text-black p-2 rounded-full z-10 hover:bg-green-200 transition duration-300'
>
<FaChevronLeft size={35} />
</button>
</div>
<div className='w-full flex justify-center overflow-hidden'>
<div className='flex transition-transform duration-500 ease-in-out gap-2'>
{getVisibleTestimonials().map((testimonial, index) => (
<div key={index} className='flex-shrink-0 w-full md:w-1/3 p-2'>
<div className='w-full p-4 bg-white border border-green-300 rounded-md shadow-md'>
<div className='flex items-center gap-4 p-2'>
<img src={testimonial.image} alt={testimonial.name} className='w-16 h-16 rounded-full' />
<div>
<p className='text-lg font-semibold text-black'>{testimonial.name}</p>
<p className='text-sm text-gray-600'>{testimonial.position}, {testimonial.company}</p>
</div>
</div>
<p className='mt-4 text-gray-700'>{testimonial.text}</p>
</div>
</div>
))}
</div>
</div>
<div className='absolute right-[-35px] top-1/2 transform -translate-y-1/2'>
<button
onClick={handleNext}
className='bg-transparent text-black p-2 rounded-full z-10 hover:bg-green-200 transition duration-300'
>
<FaChevronRight size={35} />
</button>
</div>
</div>
</div>
);
}

export default Testimonials;
39 changes: 39 additions & 0 deletions src/components/Testimonials/testimonials.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const testimonials = [
{
name: "John Doe",
position: "Care Seeker",
company: "Nacto Care",
image: "https://dpemoji.com/wp-content/uploads/2023/01/Whatsapp-dp-for-boys-57.png",
text: "Nacto Care has been a lifesaver for my family. The nurse we hired through their platform provided excellent care for my elderly parents. The entire process was smooth and professional."
},
{
name: "Jane Smith",
position: "Care Seeker",
company: "Nacto Care",
image: "https://t3.ftcdn.net/jpg/06/36/69/86/360_F_636698674_DroChEj5eWmZiaZOSDMnj8hcDqqw74Fp.jpg",
text: "The personalized care plans and flexible scheduling options offered by Nacto Care made it easy for us to get the help we needed. The nurse was knowledgeable and compassionate."
},
{
name: "Michael Johnson",
position: "Customer",
company: "Nacto Care",
image: "https://dpemoji.com/wp-content/uploads/2023/01/Whatsapp-dp-for-boys-57.png",
text: "I was impressed by the quality of service provided by Nacto Care. The platform is user-friendly, and the nurses are highly qualified. I would highly recommend them to anyone in need of home care services."
},
{
name: "Emily Brown",
position: "Care Seeker",
company: "Nacto Care",
image: "https://t3.ftcdn.net/jpg/06/36/69/86/360_F_636698674_DroChEj5eWmZiaZOSDMnj8hcDqqw74Fp.jpg",
text: "Nacto Care connected us with a fantastic nurse who took great care of my grandfather. The support and attention to detail were outstanding. Thank you for making a difference in our lives."
},
{
name: "Alex Williams",
position: "Customer",
company: "Nacto Care",
image: "https://dpemoji.com/wp-content/uploads/2023/01/Whatsapp-dp-for-boys-57.png",
text: "The life insurance scheme offered by Nacto Care gives us peace of mind knowing that our loved ones are protected. The nurse we hired was professional and dedicated to providing the best care possible."
}
];

export default testimonials;

0 comments on commit 7b7bded

Please sign in to comment.