import React from "react"; import ContextItem from "./ContextItem"; interface ContextItemType { name: string; url: string; description: string; provider: { name: string; image?: { thumbnail: { contentUrl: string; }; }; }[]; datePublished: string; image?: { contentUrl: string; thumbnail: { contentUrl: string; width: number; height: number; }; }; article?: string; score?: number; } interface NewsDetailProperties { news: { title: string; sections: { title: string; content: string; context: ContextItemType[]; }[]; }; } const NewsDetail: React.FC = ({ news }) => { return (

{news.title}

{news.sections.map((section, index) => (

{section.title}

{section.content}

Related Context:

{section.context.map((item, index_) => ( ))}
))}
); }; export default NewsDetail;