import React from 'react'; import { grassNewsData } from './NewsData'; // 引入基层新闻数据 interface NewsProps { title?: string; description?: string; time?: string; type?: string; url?: string; } const NewsItem: React.FC = ({ title = '', time = '', url = '' }) => { return (
url && window.open(url)} className="flex items-center justify-between hover:text-blue-600 cursor-pointer transition duration-300 ease-in-out" >

{title}

{time}

); }; // 使用基层新闻数据渲染列表 const List: React.FC = () => { // 调用 grassNewsData 函数获取基层新闻数据 const baseNews = grassNewsData(); return (
    {baseNews.map((news) => ( ))}
); }; export default List;