Blogs listing + Categories
This commit is contained in:
@@ -10,7 +10,9 @@ const BlogArticle: React.FC<{ blog: Blog }> = ({ blog }) => {
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge variant="secondary">{blog.category}</Badge>
|
||||
{blog.category && (
|
||||
<Badge variant="secondary">{blog.category}</Badge>
|
||||
)}
|
||||
<time className="flex items-center text-sm text-muted-foreground">
|
||||
<CalendarIcon className="mr-1 h-4 w-4" />
|
||||
{new Date(blog.published).toLocaleString()}
|
||||
@@ -57,7 +59,10 @@ const BlogArticle: React.FC<{ blog: Blog }> = ({ blog }) => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div dangerouslySetInnerHTML={{ __html: blog.content }} />
|
||||
<div
|
||||
className="prose prose-lg prose-slate dark:prose-invert"
|
||||
dangerouslySetInnerHTML={{ __html: blog.content }}
|
||||
/>
|
||||
</div>
|
||||
</article>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user