import Head from 'next/head' import Link from 'next/link' import Navbar from '../components/Navbar' import Footer from '../components/Footer' import { getPagedArticles } from '../utils/articleUtils' export default function Home({ articles, totalPages, currentPage }) { return (
iBoard - 经济数据与理论

欢迎来到 iBoard

收集和整理经济数据,以策略为主体重新组织。

经济文章

最新的经济分析和研究文章

经济数据

深入分析经济数据和趋势

策略研究

基于经济理论的数据分析框架

{articles.map((article) => (
{article.date}

{article.title}

{article.excerpt}

))}
{totalPages > 1 && (
{Array.from({ length: totalPages }, (_, index) => ( {index + 1} ))}
)}
) } export async function getServerSideProps({ query }) { const page = parseInt(query.page) || 1 const { articles, total, totalPages } = getPagedArticles(page, 5) return { props: { articles, total, totalPages, currentPage: page } } }