feat: enhance news fetching with pagination and active status filters
This commit is contained in:
@@ -17,7 +17,7 @@ export const NewsCategoriesPage = () => {
|
||||
<CategorySection
|
||||
title={name || ''}
|
||||
description={description || ''}
|
||||
items={newsData || []}
|
||||
items={newsData || Promise.resolve({ data: [] })}
|
||||
/>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ export const NewsDetailPage = () => {
|
||||
const berita: TNews = {
|
||||
title: loaderData?.beritaCategory?.name || '',
|
||||
description: loaderData?.beritaCategory?.description || '',
|
||||
items: loaderData?.beritaNews || [],
|
||||
items: loaderData?.beritaData || Promise.resolve({ data: [] }),
|
||||
}
|
||||
const currentUrl = globalThis.location
|
||||
const { title, content, featured_image, author, live_at, tags } =
|
||||
|
||||
Reference in New Issue
Block a user