From 9196ca83b0aa30ad05754826abb894fc70da3455 Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期四, 05 六月 2025 13:46:33 +0800
Subject: [PATCH] 页面调整优化

---
 src/app/supply-chain-chat/page.tsx |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/app/supply-chain-chat/page.tsx b/src/app/supply-chain-chat/page.tsx
index 5b1a046..476c435 100644
--- a/src/app/supply-chain-chat/page.tsx
+++ b/src/app/supply-chain-chat/page.tsx
@@ -1,6 +1,6 @@
 'use client';
 
-import { useState, useEffect, useRef, useCallback, useContext, createContext } from 'react';
+import { useState, useEffect, useRef, useCallback, useContext, createContext, Suspense } from 'react';
 import Link from 'next/link';
 import { useRouter, useSearchParams } from 'next/navigation';
 import Image from 'next/image';
@@ -492,7 +492,8 @@
   );
 }
 
-export default function SupplyChainChatPage() {
+// 鍒涘缓涓�涓嫭绔嬬殑缁勪欢鏉ュ鐞唘seSearchParams
+function SupplyChainChatContent() {
   const router = useRouter();
   const searchParams = useSearchParams();
   const [apiKey, setApiKey] = useState<string>('');
@@ -1410,4 +1411,20 @@
       />
     </div>
   );
+}
+
+// 涓诲鍑虹粍浠讹紝浣跨敤Suspense鍖呰鍘熸湁缁勪欢
+export default function SupplyChainChatPage() {
+  return (
+    <Suspense fallback={
+      <div className="min-h-screen bg-gradient-to-b from-gray-50 to-white flex items-center justify-center">
+        <div className="text-center">
+          <div className="w-8 h-8 border-4 border-blue-600 border-t-transparent rounded-full animate-spin mx-auto mb-4"></div>
+          <p className="text-gray-600">姝e湪鍔犺浇...</p>
+        </div>
+      </div>
+    }>
+      <SupplyChainChatContent />
+    </Suspense>
+  );
 } 
\ No newline at end of file

--
Gitblit v1.9.3