diff --git a/src/App.tsx b/src/App.tsx index 46ad013..ef966b0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,12 @@ import { Routes, Route } from 'react-router-dom'; import HomePage from './pages/HomePage'; import PrivacyPage from './pages/PrivacyPage'; +import Testimonials from './components/sections/testimonials/Testimonials'; export default function App() { return ( - } /> + } /> } /> ); diff --git a/src/components/sections/testimonials/Testimonials.tsx b/src/components/sections/testimonials/Testimonials.tsx new file mode 100644 index 0000000..15f531e --- /dev/null +++ b/src/components/sections/testimonials/Testimonials.tsx @@ -0,0 +1,71 @@ +import { useState, useEffect } from 'react'; +import { testimonials } from '../../../data/testimonials'; + +const ChevronUp = () => ( + +); + +const ChevronDown = () => ( + +); + +const Testimonials = () => { + const [activeIndex, setActiveIndex] = useState(0); + const slideHeight = 250; + + useEffect(() => { + const interval = setInterval(() => { + setActiveIndex(prev => (prev + 1) % testimonials.length); + }, 5000); + return () => clearInterval(interval); + }, []); + + const handlePrev = () => { + setActiveIndex(prev => (prev - 1 + testimonials.length) % testimonials.length); + }; + + const handleNext = () => { + setActiveIndex(prev => (prev + 1) % testimonials.length); + }; + + return ( +
+
+
+

What Our Students Say

+

Hear from our graduates who have transformed their careers with our programs.

+
+
+
+
+ {testimonials.map((testimonial, index) => ( +
+
+ "{testimonial.quote}" +
+
+

{testimonial.name}

+

{testimonial.course}

+
+
+ ))} +
+
+
+ + +
+
+
+
+ ); +}; + +export default Testimonials; \ No newline at end of file diff --git a/src/data/testimonials.ts b/src/data/testimonials.ts new file mode 100644 index 0000000..8500711 --- /dev/null +++ b/src/data/testimonials.ts @@ -0,0 +1,22 @@ +export const testimonials = [ + { + name: "John Doe", + quote: "This academy changed my life. The hands-on projects were incredibly valuable.", + course: "Full-Stack Web Development" + }, + { + name: "Jane Smith", + quote: "The instructors are industry experts who are passionate about teaching. I landed a great job right after graduating.", + course: "Data Science & Machine Learning" + }, + { + name: "Samuel Green", + quote: "I came in with zero coding experience and now I'm a confident software engineer. Highly recommended!", + course: "Cybersecurity" + }, + { + name: "Emily White", + quote: "The curriculum is up-to-date with the latest technologies. The career support team was also fantastic.", + course: "Full-Stack Web Development" + } +]; \ No newline at end of file