import React from "react"; import { clsx } from "clsx"; interface Testimonial { id: string; name: string; position: string; company: string; content: string; rating: number; avatar?: string; date?: string; } interface StandardTestimonialsProps { title?: string; description?: string; testimonials?: Testimonial[]; layout?: "grid" | "carousel" | "masonry"; showRatings?: boolean; showAvatars?: boolean; showCompany?: boolean; className?: string; theme?: { primaryColor?: string; secondaryColor?: string; accentColor?: string; fontFamily?: string; }; } const defaultTestimonials: Testimonial[] = [ { id: "1", name: "김민수", position: "CEO", company: "테크스타트업", content: "AgentC의 솔루션을 도입한 후 업무 효율성이 300% 향상되었습니다. 특히 자동화 기능이 정말 뛰어납니다.", rating: 5, avatar: "/images/testimonials/kim-minsu.jpg", date: "2024-01-15", }, { id: "2", name: "이지영", position: "마케팅 팀장", company: "글로벌 마케팅", content: "고객 관리와 데이터 분석이 한 번에 가능해져서 마케팅 캠페인의 ROI가 크게 개선되었습니다.", rating: 5, avatar: "/images/testimonials/lee-jiyoung.jpg", date: "2024-01-10", }, { id: "3", name: "박준호", position: "개발팀장", company: "소프트웨어 회사", content: "API 연동이 정말 간단하고 문서화가 잘 되어 있어서 개발 기간을 단축할 수 있었습니다.", rating: 4, avatar: "/images/testimonials/park-junho.jpg", date: "2024-01-05", }, { id: "4", name: "최수빈", position: "프로젝트 매니저", company: "컨설팅 회사", content: "팀 협업 도구로 사용하고 있는데, 프로젝트 관리가 한층 체계적으로 변했습니다.", rating: 5, avatar: "/images/testimonials/choi-subin.jpg", date: "2023-12-28", }, ]; export function StandardTestimonials({ title = "고객 후기", description = "저희 서비스를 이용하신 고객분들의 생생한 후기를 확인해보세요.", testimonials = defaultTestimonials, layout = "grid", showRatings = true, showAvatars = true, showCompany = true, className, theme = {}, }: StandardTestimonialsProps) { const renderStars = (rating: number) => { return Array.from({ length: 5 }, (_, index) => ( )); }; const renderTestimonial = (testimonial: Testimonial) => (
{showRatings && (
{renderStars(testimonial.rating)}
{testimonial.rating}/5
)}
"{testimonial.content}"
{showAvatars && (
{testimonial.avatar ? ( {testimonial.name} ) : ( {testimonial.name.charAt(0)} )}
)}
{testimonial.name}
{testimonial.position} {showCompany && testimonial.company && ( • {testimonial.company} )}
{testimonial.date && (
{new Date(testimonial.date).toLocaleDateString("ko-KR")}
)}
); return (
{/* Header */}

{title}

{description}

{/* Testimonials */}
{testimonials.map(renderTestimonial)}
{/* Call to Action */}

더 많은 고객 후기가 궁금하신가요?

); }