2025-05-06 06:21:11 +00:00
|
|
|
import React, { useEffect, useState } from "react";
|
|
|
|
|
import {
|
|
|
|
|
checkWishlistStatus,
|
|
|
|
|
createPublicSuggestion,
|
|
|
|
|
deletePublicSuggestion,
|
|
|
|
|
deleteWishlist,
|
|
|
|
|
getDetail,
|
|
|
|
|
getDetailMetaData,
|
|
|
|
|
getPublicSuggestionList,
|
|
|
|
|
saveWishlist,
|
|
|
|
|
} from "@/service/landing/landing";
|
|
|
|
|
import { Metadata } from "next";
|
|
|
|
|
import DetailImage from "@/components/main/image-detail";
|
|
|
|
|
import DetailAudio from "@/components/main/audio-detail";
|
|
|
|
|
|
|
|
|
|
interface Size {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
params: {
|
|
|
|
|
title: string;
|
|
|
|
|
slug: string;
|
|
|
|
|
description: string;
|
|
|
|
|
thumbnailLink: string;
|
2025-01-11 14:24:28 +00:00
|
|
|
};
|
2024-12-19 15:20:03 +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 audio = res?.data?.data;
|
|
|
|
|
// console.log("image", image);
|
|
|
|
|
return {
|
|
|
|
|
title: audio.title,
|
|
|
|
|
description: audio.description,
|
|
|
|
|
openGraph: {
|
|
|
|
|
title: audio?.title,
|
|
|
|
|
description: audio?.description,
|
|
|
|
|
audio: [`${audio?.thumbnailLink}`],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default async function DetailInfo({ params }: Props) {
|
|
|
|
|
return <DetailAudio />;
|
|
|
|
|
}
|