import { NewsDetails } from "@/services/NewsDetails";
import NewsDetailsComponent from "@/components/NewsDetails/NewsDetailsComponent";
export default async function NewsDetailsPage({
params,
}: {
params: { id: string };
}) {
// Await the params to ensure they are resolved
const { id } = await params;
// Find the news item based on the id
const newsItem = NewsDetails.find((news) => news.id === id);
if (!newsItem) {
return (
<>
News Not Found
Sorry, the news item you are looking for does not exist.