import { Card, Typography, Button, Empty } from "antd"; import { PostDto } from "@nice/common"; import DeptInfo from "@web/src/app/main/path/components/DeptInfo"; import TermInfo from "@web/src/app/main/path/components/TermInfo"; import { PictureOutlined } from "@ant-design/icons"; interface PostCardProps { post?: PostDto; onClick?: (post?: PostDto) => void; } const { Title } = Typography; export default function PostCard({ post, onClick }: PostCardProps) { const handleClick = (post: PostDto) => { onClick?.(post); }; return ( handleClick(post)} key={post?.id} hoverable className="group overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2" cover={
{post?.meta?.thumbnail ? (
) : (
)}
}>
<button> {post?.title}</button>
); }