import Image from "next/image"; import { Card, CardContent } from "poyraz-ui/atoms"; import { StarRating } from "poyraz-ui/molecules"; import { REFERENCES } from "@/data/references"; import { useLocale } from "next-intl"; import { getLocalizedValue } from "@/lib/locale"; type ReferenceCardsProps = { className?: string; cardClassName?: string; lineClamp?: boolean; showRating?: boolean; }; export function ReferenceCards({ className, cardClassName, lineClamp, showRating = true, }: ReferenceCardsProps) { const locale = useLocale(); const hoverClassName = "transition-colors duration-200 group-hover:border-red-600/40 group-hover:bg-muted/30"; return (
{REFERENCES.map((item) => { const quoteText = getLocalizedValue(item.quote, locale); const card = (
{quoteText}
{showRating && item.rating != null ? ( ) : null}
{item.author}
{getLocalizedValue(item.role, locale)}
); const href = item.documentHref || item.profileHref; if (!href) { return
{card}
; } return ( {card} ); })}
); }