@@ -13,6 +13,7 @@ import { deletePost } from "../_services/action";
1313import { PostType } from "../_services/query" ;
1414import { DeleteDialog } from "./DeleteDialog" ;
1515import PostCommentCount from "./PostCommentCount" ;
16+ import PostTags from "./PostTags" ;
1617import PostUpvote from "./PostUpvote" ;
1718
1819interface PostProps {
@@ -70,7 +71,7 @@ export default function Post({ post, isAdmin, onDelete }: PostProps) {
7071 return (
7172 < div >
7273 < Box
73- className = "group relative flex h-[400px ] cursor-pointer flex-col justify-between rounded-xl p-3"
74+ className = "group relative flex h-[440px ] cursor-pointer flex-col justify-between rounded-xl p-3"
7475 onClick = { openModal }
7576 >
7677 { /* Delete Button in top-right */ }
@@ -105,25 +106,28 @@ export default function Post({ post, isAdmin, onDelete }: PostProps) {
105106 </ div >
106107
107108 < div className = "h-[60px] flex-grow" >
108- < p className = "mt-2 line-clamp-2 text-xl font-semibold text-gray-700 dark:text-gray-300" >
109+ < p className = "mt-2 line-clamp-2 text-xl font-semibold leading-snug text-gray-700 dark:text-gray-300" >
109110 { post . title }
110111 </ p >
111112 </ div >
113+ < div className = "mb-2" >
114+ < PostTags post = { post } minimal = { true } />
115+ </ div >
112116
113117 < p className = "text-sm text-gray-500 dark:text-gray-400" >
114118 { format ( new Date ( post . created_at ) , "MMM d, yyyy" ) }
115119 </ p >
116120 </ div >
117121
118- < div className = "h-60 w-full overflow-hidden rounded-sm" >
122+ < div className = "my-2 h-60 w-full overflow-hidden rounded-sm" >
119123 < img
120124 src = { post . image_url || "/assets/images/bg-certificate.png" }
121125 alt = "Post image"
122126 className = "h-full w-full object-cover"
123127 />
124128 </ div >
125129
126- < div className = "mx-4 mt-4 flex items-center space-x-4 text-gray-600 dark:text-gray-400" >
130+ < div className = "mx-4 flex items-center space-x-4 text-gray-600 dark:text-gray-400" >
127131 < PostUpvote post = { post } />
128132
129133 < PostCommentCount post = { post } />
0 commit comments