/
aaronair
/
Test_task_rt_solution
Обзор
Документация
Войти
/
aaronair
/
Test_task_rt_solution
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/components/CommentList.tsx
27 строк
773 B
Ilikedrinkpivo
first_commit
28 май 2026, 14:51
28 май 2026, 14:51
b4498fc
Код
Авторство
О чём код?
import type { Comment } from "@/features/initiatives/types"; import { formatDateTime } from "@/lib/format"; interface Props { comments: Comment[]; } export function CommentList({ comments }: Props) { return ( <ul className="space-y-3"> {comments.map((c) => ( <li key={c.id} className="rounded-lg border border-ink-300/40 bg-surface-card p-4" > <div className="flex items-center justify-between text-xs text-ink-500"> <span className="font-medium text-ink-700">{c.author}</span> <span>{formatDateTime(c.createdAt)}</span> </div> <p className="mt-2 text-sm text-ink-800 whitespace-pre-wrap"> {c.text} </p> </li> ))} </ul> ); }