From 2fc1a586f8fa128233483b69fb99606d4da2164a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Tue, 21 Apr 2026 08:38:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(contact):=20=E4=BF=AE=E5=A4=8D=E9=9D=99?= =?UTF-8?q?=E6=80=81=E5=AF=BC=E5=87=BA=E6=97=B6=20useSearchParams=20?= =?UTF-8?q?=E9=9C=80=E8=A6=81=20Suspense=20=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 ContactFormContent 组件用 Suspense 包裹 - 添加加载中 fallback 状态 - 确保静态导出兼容性 --- src/app/(marketing)/contact/page.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app/(marketing)/contact/page.tsx b/src/app/(marketing)/contact/page.tsx index 9d16202..9c570ed 100644 --- a/src/app/(marketing)/contact/page.tsx +++ b/src/app/(marketing)/contact/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useEffect, useRef } from 'react'; +import { useState, useEffect, useRef, Suspense } from 'react'; import { useSearchParams } from 'next/navigation'; import { z } from 'zod'; import { Button } from '@/components/ui/button'; @@ -28,7 +28,7 @@ interface FormErrors { message?: string; } -export default function ContactPage() { +function ContactFormContent() { const searchParams = useSearchParams(); const isSuccessFromRedirect = searchParams.get('success') === 'true'; const [isVisible, setIsVisible] = useState(false); @@ -372,3 +372,15 @@ export default function ContactPage() { ); } + +export default function ContactPage() { + return ( + +
加载中...
+ + }> + +
+ ); +}