Browse Source

去除动态加载

李富豪 5 months ago
parent
commit
f67f6c4c3b
1 changed files with 30 additions and 27 deletions
  1. 30 27
      app/components/home.tsx

+ 30 - 27
app/components/home.tsx

@@ -22,6 +22,9 @@ import { AuthPage } from "./auth";
 import { getClientConfig } from "../config/client";
 import { type ClientApi, getClientApi } from "../client/api";
 import { useAccessStore } from "../store";
+import HomeApp from "./DeekSeekHome";
+import { Chat } from "./chat";
+import { Chat as DeepSeekChat } from "./DeepSeekChat";
 
 export function Loading() {
   /** second版本注释掉进度条 */
@@ -100,25 +103,25 @@ const Settings = dynamic(
   }
 );
 
-const Chat = dynamic(
-  async () => {
-    await delayer();
-    return (await import("./chat")).Chat
-  },
-  {
-    loading: () => <Loading />,
-  }
-);
-
-const DeepSeekChat = dynamic(
-  async () => {
-    await delayer();
-    return (await import("./DeepSeekChat")).Chat
-  },
-  {
-    loading: () => <Loading />,
-  }
-);
+// const Chat = dynamic(
+//   async () => {
+//     await delayer();
+//     return (await import("./chat")).Chat
+//   },
+//   {
+//     loading: () => <Loading />,
+//   }
+// );
+
+// const DeepSeekChat = dynamic(
+//   async () => {
+//     await delayer();
+//     return (await import("./DeepSeekChat")).Chat
+//   },
+//   {
+//     loading: () => <Loading />,
+//   }
+// );
 
 const Record = dynamic(
   async () => {
@@ -130,14 +133,14 @@ const Record = dynamic(
   }
 );
 
-const HomeApp = dynamic(
-  async () => {
-    return (await import("./DeekSeekHome"))
-  },
-  {
-    loading: () => <Loading />,
-  }
-);
+// const HomeApp = dynamic(
+//   async () => {
+//     return (await import("./DeekSeekHome"))
+//   },
+//   {
+//     loading: () => <Loading />,
+//   }
+// );
 
 const NewChat = dynamic(
   async () => {