From 92f233bd97f0eede87384a81d83cb840f7778aa3 Mon Sep 17 00:00:00 2001 From: Rama Priyanto Date: Tue, 20 May 2025 15:53:32 +0700 Subject: [PATCH] fix:detail page --- app/news/detail/[id]/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/news/detail/[id]/page.tsx b/app/news/detail/[id]/page.tsx index eabe05f..db1ebb8 100644 --- a/app/news/detail/[id]/page.tsx +++ b/app/news/detail/[id]/page.tsx @@ -8,7 +8,7 @@ type Props = { }; export async function generateMetadata({ params }: any): Promise { - const res = await getArticleByIdHumas(params.id?.split("-")[0]); + const res = await getArticleById(params.id?.split("-")[0]); const article = res?.data?.data; return { title: article.title, @@ -23,7 +23,7 @@ export async function generateMetadata({ params }: any): Promise { export default async function NewsPage({ params }: any) { const articleId = params.id?.split("-")[0]; - const res = await getArticleByIdHumas(articleId); + const res = await getArticleById(articleId); const article = res?.data?.data; return (