Browse Source

fix: 增加dymic 动态导入组件

Before 5 months ago
parent
commit
1489e704ef
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/app/[locale]/(TabBar)/[[...share]]/page.tsx

+ 3 - 1
src/app/[locale]/(TabBar)/[[...share]]/page.tsx

@@ -1,7 +1,9 @@
 "use server";
 import { GroupType } from "@/api/home";
 import { server } from "@/utils/server";
-import HomeTabs from "./_home/HomeTabs";
+import dynamic from "next/dynamic";
+
+const HomeTabs = dynamic(() => import("./_home/HomeTabs"));
 
 const TIME = 0;
 const getGames = async () => {