import type { TAuthorResponse } from '~/apis/common/get-news' import { formatDate } from '~/utils/formatter' type TDetailNewsAuthor = { author?: TAuthorResponse live_at?: string text?: string } export const NewsAuthor = ({ author, live_at, text }: TDetailNewsAuthor) => { return (
{ event.currentTarget.src = '/images/profile-placeholder.svg' }} alt={author?.name} className="size-12 rounded-full bg-[#C4C4C4] object-cover" />

{author?.name}

{live_at && `${formatDate(live_at)}`} ยท {text}

) }