fix:detail page
This commit is contained in:
parent
c55ed8038a
commit
92f233bd97
|
|
@ -8,7 +8,7 @@ type Props = {
|
|||
};
|
||||
|
||||
export async function generateMetadata({ params }: any): Promise<Metadata> {
|
||||
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<Metadata> {
|
|||
|
||||
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 (
|
||||
<HumasLayout>
|
||||
|
|
|
|||
Loading…
Reference in New Issue