chore: added dates to post lists
45d8931c
1 file(s) · +12 −5
| 134 | 134 | <span className="font-medium line-clamp-2 leading-snug"> |
|
| 135 | 135 | {post.title} |
|
| 136 | 136 | </span> |
|
| 137 | - | {post.author && ( |
|
| 138 | - | <span className="text-muted-foreground text-xs"> |
|
| 139 | - | {post.author} |
|
| 140 | - | </span> |
|
| 141 | - | )} |
|
| 137 | + | <div className="flex items-center justify-between"> |
|
| 138 | + | {post.author && ( |
|
| 139 | + | <span className="text-muted-foreground truncate text-xs"> |
|
| 140 | + | {post.author} |
|
| 141 | + | </span> |
|
| 142 | + | )} |
|
| 143 | + | {post.publishedDate && ( |
|
| 144 | + | <span className="text-muted-foreground text-xs"> |
|
| 145 | + | {new Date(post.publishedDate).toLocaleDateString()} |
|
| 146 | + | </span> |
|
| 147 | + | )} |
|
| 148 | + | </div> |
|
| 142 | 149 | </div> |
|
| 143 | 150 | </button> |
|
| 144 | 151 | ); |