diff --git a/components/homePage/Banner.js b/components/homePage/Banner.js index f7929c6c..177fdabf 100644 --- a/components/homePage/Banner.js +++ b/components/homePage/Banner.js @@ -20,7 +20,7 @@ function Banner({ isMentorLoggedIn }) { mentoring and enhance your chances of landing your ideal intern.

-
+
{loader == 1 ? (
diff --git a/components/layout/Header.js b/components/layout/Header.js index aef1f064..d3e24ac7 100644 --- a/components/layout/Header.js +++ b/components/layout/Header.js @@ -10,6 +10,13 @@ import { useAuth } from "../../context/AuthContext"; import { ButtonLink } from "../UI"; import clsx from "clsx"; import { useTheme } from "../../hook/use-theme"; +import { ImUsers } from "react-icons/im"; +import { GiTeacher } from "react-icons/gi"; +import { PiStepsFill } from "react-icons/pi"; +import { HiHome } from "react-icons/hi2"; +import { AiFillContacts } from "react-icons/ai"; +import { FaSignInAlt } from "react-icons/fa"; +import { LiaBlogSolid } from "react-icons/lia"; function Header() { const { @@ -101,23 +108,43 @@ function Header() { {/* For Desktop Navigation*/}
- - Home + + Home - + + Mentor - - Blogs + + Blogs - + + Community - - Career + + Career - - Contact + + Contact {/* show profile card if user is logged in else show signin link */} {isUserLoggedIn || isMentorLoggedIn ? ( @@ -203,6 +230,7 @@ function Header() { href="/auth/login?entityType=user" className="tw-text-xl tw-p-2 tw-font-inter tw-text-base-400 hover:tw-text-base-500 tw-font-medium" > + Sign In )} diff --git a/components/mentorPage/components/Testimonials.js b/components/mentorPage/components/Testimonials.js index 4e68ce7e..2e0229c5 100644 --- a/components/mentorPage/components/Testimonials.js +++ b/components/mentorPage/components/Testimonials.js @@ -9,85 +9,103 @@ import { RxDotFilled } from "react-icons/rx"; const Testimonials = ({ data }) => { const [currentIndex, setCurrentIndex] = useState(0); + const [isAnimating, setIsAnimating] = useState(false); const prevSlide = () => { - if (currentIndex === 0) return setCurrentIndex(data.length - 1); - setCurrentIndex((currentIndex - 1) % data.length); + if (isAnimating) return; // Prevent clicks during animation + setIsAnimating(true); + setTimeout(() => { + setCurrentIndex((prevIndex) => + prevIndex === 0 ? data.length - 1 : prevIndex - 1 + ); + setIsAnimating(false); + }, 1000); // Match the duration of the CSS animation }; const nextSlide = () => { - setCurrentIndex((currentIndex + 1) % data.length); + if (isAnimating) return; // Prevent clicks during animation + setIsAnimating(true); + setTimeout(() => { + setCurrentIndex((prevIndex) => (prevIndex + 1) % data.length); + setIsAnimating(false); + }, 1000); }; useEffect(() => { const interval = setInterval(() => { - setCurrentIndex((currentIndex + 1) % data.length); - }, 5000); + nextSlide(); // Trigger the next slide automatically + }, 2000); // Slides every 5 seconds + return () => clearInterval(interval); - }, [currentIndex]); + }, []); return (
-
- {data[currentIndex].testimonialUserName} +
+
+ {data.map((testimonial, index) => ( +
+
+ {testimonial.testimonialUserName} +
+

+ {testimonial.testimonialUserName} +

+

+ {testimonial.testimonialUserHeadline} +

+
+ {[...Array(5)].map((star, i) => ( + + ))} +
+

+ {testimonial.testimonialDescription} +

+
+ ))} +
- {/* left arraow */} -
+ + {/* Left arrow */} +
- {/* right arrow */} + {/* Right arrow */}
-
-
-

- {data[currentIndex].testimonialUserName} -

-

- {data[currentIndex].testimonialUserHeadline} -

-
- {[...Array(5)].map((star, i) => { - const ratingValue = i + 1; - return ( - - ); - })} -
-

- {data[currentIndex].testimonialDescription} -

-
-
+ + {/* Dots */}
- {data.map((testimonial, index) => { - return ( - setCurrentIndex(index)} - /> - ); - })} + {data.map((testimonial, index) => ( + setCurrentIndex(index)} + /> + ))}
); diff --git a/package.json b/package.json index 072da7da..dddc15a5 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "react-cookie": "^4.1.1", "react-dom": "18.2.0", "react-easy-crop": "^4.7.4", - "react-icons": "^4.10.1", + "react-icons": "^4.12.0", "react-owl-carousel": "^2.3.3", "react-query": "^3.39.3", "react-router-dom": "^6.14.1",