fix: fall back to date_created when published_at is null so every article shows a date
This commit is contained in:
+1
-1
@@ -79,7 +79,7 @@ export async function getArticleBySlug(slug: string): Promise<Article | null> {
|
||||
readItems('articles', {
|
||||
fields: [
|
||||
'id', 'title', 'slug', 'status', 'content', 'excerpt',
|
||||
'featured_image', 'published_at', 'is_featured',
|
||||
'featured_image', 'published_at', 'date_created', 'is_featured',
|
||||
'seo_title', 'seo_description',
|
||||
'category.id', 'category.name', 'category.slug',
|
||||
'tags.tags_id.id', 'tags.tags_id.name', 'tags.tags_id.slug',
|
||||
|
||||
@@ -26,6 +26,7 @@ export interface Article {
|
||||
excerpt: string | null
|
||||
featured_image: string | null
|
||||
published_at: string | null
|
||||
date_created: string | null
|
||||
is_featured: boolean
|
||||
seo_title: string | null
|
||||
seo_description: string | null
|
||||
|
||||
Reference in New Issue
Block a user