change the npm to yarn and update the json
This commit is contained in:
parent
78738c9282
commit
effd1d38d0
19 changed files with 4111 additions and 6 deletions
35
ui/components/NewsDetail.tsx
Normal file
35
ui/components/NewsDetail.tsx
Normal file
|
@ -0,0 +1,35 @@
|
|||
import React from "react";
|
||||
import ContextItem from "./ContextItem";
|
||||
|
||||
interface NewsDetailProps {
|
||||
news: {
|
||||
title: string;
|
||||
sections: {
|
||||
title: string;
|
||||
content: string;
|
||||
context: any[];
|
||||
}[];
|
||||
};
|
||||
}
|
||||
|
||||
const NewsDetail: React.FC<NewsDetailProps> = ({ news }) => {
|
||||
return (
|
||||
<article className="prose lg:prose-xl">
|
||||
<h1>{news.title}</h1>
|
||||
{news.sections.map((section, index) => (
|
||||
<section key={index}>
|
||||
<h2>{section.title}</h2>
|
||||
<p>{section.content}</p>
|
||||
<div className="mt-4">
|
||||
<h3>Related Context:</h3>
|
||||
{section.context.map((item, i) => (
|
||||
<ContextItem key={i} item={item} />
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
))}
|
||||
</article>
|
||||
);
|
||||
};
|
||||
|
||||
export default NewsDetail;
|
Loading…
Add table
Add a link
Reference in a new issue