mediahub-fe/app/[locale]/(public)/image/detail/[slug]/page.tsx

48 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-12-13 14:33:59 +00:00
import React, { useEffect, useState } from "react";
2025-04-06 13:26:35 +00:00
import {
checkWishlistStatus,
createPublicSuggestion,
deletePublicSuggestion,
deleteWishlist,
getDetail,
2025-05-06 06:21:11 +00:00
getDetailMetaData,
2025-04-06 13:26:35 +00:00
getPublicSuggestionList,
saveWishlist,
} from "@/service/landing/landing";
2025-05-06 06:21:11 +00:00
import { Metadata } from "next";
import DetailImage from "@/components/main/image-detail";
2025-02-20 09:31:43 +00:00
interface Size {
label: string;
value: string;
}
2025-05-06 06:21:11 +00:00
type Props = {
params: {
title: string;
slug: string;
description: string;
thumbnailLink: string;
2025-01-20 14:51:01 +00:00
};
2025-05-06 06:21:11 +00:00
};
2025-01-20 14:51:01 +00:00
2025-05-06 06:21:11 +00:00
export async function generateMetadata({ params }: any): Promise<Metadata> {
const slug = String(params?.slug);
const res = await getDetailMetaData(String(slug));
const image = res?.data?.data;
// console.log("image", image);
return {
title: image.title,
description: image.description,
openGraph: {
title: image?.title,
description: image?.description,
2025-07-21 08:24:01 +00:00
images: [`${image?.smallThumbnailLink}`],
2025-05-06 06:21:11 +00:00
},
2025-01-20 14:51:01 +00:00
};
2025-05-06 06:21:11 +00:00
}
2025-01-16 16:55:04 +00:00
2025-05-06 06:21:11 +00:00
export default async function DetailInfo({ params }: Props) {
2025-06-05 09:23:46 +00:00
return <div className="w-full"><DetailImage /></div>;
2025-05-06 06:21:11 +00:00
}