From 2a6bbbfe1a90c959b10d329326708941299ae226 Mon Sep 17 00:00:00 2001 From: Keshav Maheshwari <94895949+keshav861@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:17:20 +0530 Subject: [PATCH] navigation arrow fixed for sponsor and testimonial. (#30) * Fix invalid import in contentlayer config * Update globals.css * navigation arrows fixed --------- Co-authored-by: Matteo Lodi <30625432+mlodic@users.noreply.github.com> Co-authored-by: Abheek Tripathy <90976669+abheektripathy@users.noreply.github.com> Co-authored-by: Syed Ahkam --- components/Slider.tsx | 89 ++++++++++++++++++++++++------------------- src/app/globals.css | 64 ++++++++++++++++++++++++++----- 2 files changed, 105 insertions(+), 48 deletions(-) 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} +

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