From 5e4d07f59fa6bf2d30ac445228e4c23bd0741736 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Tue, 8 Sep 2026 18:16:32 +0700 Subject: [PATCH] fix : build issue --- app/page.tsx | 14 ++++++++++++-- tests/public-performance.test.ts | 4 +++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index a8e9875..d34fa5c 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,11 +1,19 @@ +import { connection } from "next/server"; +import { Suspense } from "react"; + import { LiveRefresh } from "@/components/live-refresh"; import { SiteFooter } from "@/components/public/site-footer"; import { StructuredDirectory } from "@/components/public/structured-directory"; import { SiteHeader } from "@/components/public/site-header"; import { getCachedPublicGuideCards } from "@/lib/cache/public"; -export default async function HomePage() { +async function DirectoryContent() { + await connection(); const guides = await getCachedPublicGuideCards(); + return ; +} + +export default function HomePage() { return (
@@ -19,7 +27,9 @@ export default async function HomePage() { ไกด์ตัวละคร อาวุธ อาร์ติแฟกต์ กลุ่มดาว และคำนวณทีม

- +
diff --git a/tests/public-performance.test.ts b/tests/public-performance.test.ts index 84bae5a..94909ec 100644 --- a/tests/public-performance.test.ts +++ b/tests/public-performance.test.ts @@ -14,8 +14,10 @@ describe("public rendering performance", () => { ]); expect(layout).not.toContain("export const instant = false"); - expect(page).not.toContain("connection()"); expect(page).not.toContain("export const instant = false"); + expect(page).toContain("async function DirectoryContent()"); + expect(page).toContain("await connection()"); + expect(page).toContain('fallback={
{