'use client'; import { motion } from 'framer-motion'; import { useInView } from 'framer-motion'; import { useRef } from 'react'; import { StaticLink } from '@/components/ui/static-link'; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; import { ArrowRight, Calendar } from 'lucide-react'; import { NEWS } from '@/lib/constants'; export function NewsSection() { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); const displayedNews = [...NEWS] .sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()) .slice(0, 4); return (

最新资讯

了解公司最新动态、行业资讯和技术分享

{displayedNews.length > 0 ? (
{displayedNews.map((newsItem, idx) => (
{newsItem.category} {newsItem.date}
{newsItem.title}
{newsItem.excerpt} 阅读更多
))}
) : (

暂无新闻信息

)} 查看全部新闻
); }