import { ChevronDownIcon, StarIcon, User2Icon } from 'lucide-react'; import { useState } from 'react'; import { cn } from '../../../editor/utils/classname'; import { markdownToHtml } from '../../lib/markdown'; type Review = { name: string; role: string; rating: number; text: string | string[]; avatarUrl?: string; isProminent?: boolean; isSecondaryProminent?: boolean; }; export function ReviewsSection() { const [isExpanded, setIsExpanded] = useState(false); const reviews: Review[] = [ { name: 'Robin Wieruch', role: 'Author - Multiple best-selling books', rating: 5, text: [ 'Kamran has been in the **educative space for a long time**, and it shows in the way he teaches SQL: clear, structured, and straight to the point.', "He breaks down SQL fundamentals in a way that's both **intuitive and practical**, helping you not just write queries, but truly understand how databases work.", "Even if you've used SQL before, this **course will fill in gaps you didn't even realize you had**. Get ready to level up your database skills!", ], avatarUrl: 'https://assets.roadmap.sh/guest/robin.jpeg', isProminent: true, }, { name: 'William Imoh', role: 'Founder and Data Enthusiast', rating: 5, text: [ 'I found this course to be **really well thought out**. I bought this course for the advanced chapters, but I ended up learning a bunch of new things even from the beginner lessons.', 'No matter your SQL experience, this course is **a must-have** if you want to level up your SQL and data analysis skills. Highly recommended!', ], avatarUrl: 'https://assets.roadmap.sh/guest/william-imoh-sd2dk.jpg', isProminent: true, }, { name: 'Tomáš Janků', role: 'Software Engineer', rating: 5, text: "The course and it's interactivity is excellent and I'd honestly say it's **one of the best** on the SQL theme I've seen out there.", avatarUrl: 'https://assets.roadmap.sh/guest/tomas-janku-6bg89.jpeg', }, { name: 'Gourav Khunger', role: 'Software Engineer', rating: 5, text: 'This course was **absolutely brilliant!** The integrated database environment to practice what I learned was the best part.', avatarUrl: 'https://assets.roadmap.sh/guest/gourav-h2f3a.png', }, { name: 'Meabed', role: 'CTO', rating: 5, text: 'Kamran has **clearly put a lot of thought** into this course. The content, structure and exercises were all great.', avatarUrl: 'https://assets.roadmap.sh/guest/meabed-fu83q.jpeg', }, { name: 'Mohsin Aheer', role: 'Sr. Software Engineer', rating: 5, text: 'I already knew SQL but this course **taught me a bunch of new things.** Practical examples and challenges were great. Highly recommended!', avatarUrl: 'https://assets.roadmap.sh/guest/mohsinaheer-szchu.jpeg', }, { name: 'Reeve Tee', role: 'Software Engineer', rating: 5, text: 'I found the course **highly comprehensive and incredibly valuable**. I would love to see more courses like this!', avatarUrl: '', }, { name: 'Zeeshan', role: 'Sr. Software Engineer', rating: 5, text: 'Loved the teaching style and the way the course was structured. The **AI tutor was a great help** when I got stuck.', avatarUrl: 'https://assets.roadmap.sh/guest/ziishaned-qjepj.png', }, { name: 'Adnan Ahmed', role: 'Engineering Manager', rating: 5, text: 'Having the integrated IDE made a huge difference. Being able to **immediately practice** what I learned was **invaluable**.', avatarUrl: 'https://assets.roadmap.sh/guest/idnan-fzps5.jpeg', }, { name: 'Kalvin Chakma', role: 'Jr. Software Engineer', rating: 5, text: "Best SQL course I've taken. The progression from basic to advanced concepts is **well thought out**, and the challenges are **excellent**.", avatarUrl: 'https://assets.roadmap.sh/guest/kalvin-d65ol.jpeg', }, { name: 'Faisal Ahsan', role: 'Software Engineer', rating: 5, text: 'The course and the learning experience was great. What I really liked was the **no-fluff explanations** and **practical examples**.', avatarUrl: 'https://assets.roadmap.sh/guest/faisal-q78p2.jpeg', }, ]; const prominentReviews = reviews.filter((r) => r.isProminent); const regularReviews = reviews.filter((r) => !r.isProminent); return (
{/* Prominent Reviews */}
{prominentReviews.map((review, index) => (
{review.avatarUrl && ( {review.name} )} {!review.avatarUrl && (
)}

{review.name}

{review.role}

{Array.from({ length: review.rating }).map((_, i) => ( ))}
{(typeof review.text === 'string' ? [review.text] : review.text ).map((text, index) => (

))}

))}
{regularReviews.map((review, index) => (
{review.avatarUrl && ( {review.name} )} {!review.avatarUrl && (
)}

{review.name}

{review.role}

{Array.from({ length: review.rating }).map((_, i) => ( ))}

))}
); }