---
import RatingStars from './RatingStars.astro';
export interface Props {
name: string;
profession: string;
text: string;
rating: number;
initial: string;
color: string;
date: string;
votesCount?: number;
isHelpful?: boolean;
}
const {
name,
profession,
text,
rating,
initial,
color,
date,
votesCount = 0,
isHelpful = false
} = Astro.props;
// Форматируем дату
const formatDate = (dateStr: string) => {
const date = new Date(dateStr);
return date.toLocaleDateString('ru-RU', {
day: 'numeric',
month: 'long',
year: 'numeric'
});
};
---
Полезен ли этот отзыв?
{votesCount}
{isHelpful && (
Полезно
)}