fixing metadata
This commit is contained in:
parent
daadd78f0b
commit
fccb7d60f1
|
|
@ -10,14 +10,13 @@ type Props = {
|
||||||
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||||
const res = await getArticleById(params.id?.split("-")[0]);
|
const res = await getArticleById(params.id?.split("-")[0]);
|
||||||
const article = res?.data?.data;
|
const article = res?.data?.data;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: article.title,
|
title: article.title,
|
||||||
description: article.description,
|
description: article.description,
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: article.title,
|
title: article.title,
|
||||||
description: article.description,
|
description: article.description,
|
||||||
images: article.thumbnailUrl,
|
images: [`${article.thumbnailUrl}`],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue