diff options
| author | Bertrand Yuan <bert.yuan@outlook.com> | 2025-12-16 00:15:04 +0800 |
|---|---|---|
| committer | Bertrand Yuan <bert.yuan@outlook.com> | 2025-12-16 00:15:04 +0800 |
| commit | 785371bb3eccca455e5ce5fccbe9b6e3752a03f6 (patch) | |
| tree | dd006593448c3500bdcb414af3b4656f7a7683d4 /src/app/(main)/(home)/page.tsx | |
| parent | 02ae938c238c9d18448d17a8ec92c0edd8c17463 (diff) | |
fix(front-end): bug in viewing posts
Diffstat (limited to 'src/app/(main)/(home)/page.tsx')
| -rw-r--r-- | src/app/(main)/(home)/page.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/app/(main)/(home)/page.tsx b/src/app/(main)/(home)/page.tsx index a94193c..0718da9 100644 --- a/src/app/(main)/(home)/page.tsx +++ b/src/app/(main)/(home)/page.tsx @@ -3,16 +3,11 @@ import Posts from '@/app/(main)/(home)/_components/posts'; import { Icons } from '@/components/icons/icons'; import { Section } from '@/components/section'; import Separator from '@/components/separator'; -import { getSortedByDatePosts } from '@/lib/source'; import { getPublishedPosts } from '@/lib/payload-posts'; import { CTA } from './_components/call-to-action'; export default async function Home() { - // 获取 MDX 文章(保留原有功能) - // const mdxPosts = getSortedByDatePosts().slice(0, 3); - - // 获取 Payload CMS 文章 - const { posts: payloadPosts } = await getPublishedPosts({ limit: 3 }); + const { posts } = await getPublishedPosts({ limit: 3 }); return ( <> @@ -26,7 +21,7 @@ export default async function Home() { </h2> </Section> <Separator /> - <Posts mdxPosts={[]} payloadPosts={payloadPosts} /> + <Posts posts={posts} /> <Separator /> <CTA /> </> |
