import Link from 'next/link'; import { ChevronRight, Eye, FileText } from 'lucide-react'; import { clsx } from 'clsx'; import StatusBadge from '@/components/ui/StatusBadge'; import { Post } from '@/types'; interface PostListItemProps { post: Post; showViews?: boolean; } const isNoticePost = (post: Post) => { const categoryName = post.categoryName || ''; return categoryName === '공지' || categoryName.toLowerCase() === 'notice'; }; const formatDate = (value: string) => { const date = new Date(value); if (Number.isNaN(date.getTime())) return ''; return new Intl.DateTimeFormat('ko-KR', { year: 'numeric', month: '2-digit', day: '2-digit', }).format(date); }; export default function PostListItem({ post, showViews = false }: PostListItemProps) { const isNotice = isNoticePost(post); return (