diff --git a/components/Slider.tsx b/components/Slider.tsx index 8a3fcaa..ca34234 100644 --- a/components/Slider.tsx +++ b/components/Slider.tsx @@ -4,21 +4,24 @@ import { TestimonialData } from "../constants/testimonialsdata"; import { Sponsordata } from "../constants/sponsordata"; import Link from "next/link"; -import { Autoplay } from "swiper"; +import SwiperCore, { Autoplay, Navigation } from "swiper"; import { Swiper, SwiperSlide } from "swiper/react"; import "swiper/css"; +import "swiper/swiper-bundle.css"; -interface sliderProps { +SwiperCore.use([Autoplay, Navigation]); + +interface SliderProps { isTestimonial: boolean; } -export default function Slider(props: sliderProps) { +export default function Slider(props: SliderProps) { const { isTestimonial } = props; return ( <> {isTestimonial ? ( -
+
- {TestimonialData.map((testimonial, index) => { - return ( -
- -
-

- - {testimonial.review.length <= 300 - ? testimonial.review - : testimonial.review.slice(0, 300) + "..."} - -

-
-
- profile picture -
-

- {testimonial.name} -

-

- {testimonial.designation} -

-
-
+ {TestimonialData.map((testimonial, index) => ( + +
+

+ + {testimonial.review.length <= 300 ? testimonial.review : testimonial.review.slice(0, 300) + "..."} + +

+
+
+ profile picture +
+

+ {testimonial.name} +

+

+ {testimonial.designation} +

-
- + +
- ); - })} + + ))} +
+
) : (