diff --git a/components/landing/HeaderNews.tsx b/components/landing/HeaderNews.tsx index c24592f..89241a6 100644 --- a/components/landing/HeaderNews.tsx +++ b/components/landing/HeaderNews.tsx @@ -82,7 +82,7 @@ export default function HeaderNews() {
- {banner?.length > 0 ? ( + {hotNews?.length > 0 ? (
- {banner?.length > 0 ? ( + {hotNews?.length > 0 ? ( - {banner?.lenth > 0 && - banner.map((newsItem: any, index: number) => ( - - - headernews + {hotNews.map((newsItem: any, index: number) => ( + + + headernews - -
- -

- {textEllipsis(newsItem.title, 40)} -

- -
-

- {convertDateFormat(newsItem.createdAt)} WIB -

-

- - {newsItem.viewCount === null - ? 0 - : newsItem.viewCount} -

-
+ +
+ +

+ {textEllipsis(newsItem.title, 40)} +

+ +
+

+ {convertDateFormat(newsItem.createdAt)} WIB +

+

+ + {newsItem.viewCount === null + ? 0 + : newsItem.viewCount} +

- - - - ))} +
+
+ + + ))} ) : ( @@ -322,8 +321,8 @@ export default function HeaderNews() {
- {article.length > 0 ? ( - article.map((list: any, index: number) => ( + {article?.length > 0 ? ( + article?.map((list: any, index: number) => (