"use client"; import { cn } from "@/shared/lib/utils"; import { Card } from "@/shared/ui/card"; import { Avatar, AvatarFallback, AvatarImage } from "@/shared/ui/avatar"; import { motion } from "framer-motion"; import { Star, Quote } from "lucide-react"; export interface TestimonialCardProps { content: string; author: { name: string; role: string; company?: string; avatar?: string; }; rating?: number; variant?: "card" | "quote"; className?: string; } /** * Карточка отзыва клиента * Используется в Social Proof Section */ export function TestimonialCard({ content, author, rating, variant = "card", className, }: TestimonialCardProps) { const getInitials = (name: string) => { return name .split(" ") .map((n) => n[0]) .join("") .toUpperCase() .slice(0, 2); }; if (variant === "quote") { return (

{content}

{getInitials(author.name)}
{author.name}
{author.role} {author.company && ` @ ${author.company}`}
); } return ( {rating && (
{Array.from({ length: 5 }).map((_, i) => ( ))}
)}

{content}

{getInitials(author.name)}
{author.name}
{author.role} {author.company && ` @ ${author.company}`}
); }