ansoni před 4 měsíci
rodič
revize
0c28d32b8f

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

@@ -17,6 +17,7 @@ const getBanners = async () => {
 const Page = async () => {
     const banners = await getBanners();
     if (!banners.length) return null;
+
     return <HomeSwiper banners={banners}></HomeSwiper>;
 };
 

+ 2 - 2
src/app/[locale]/(TabBar)/[[...share]]/layout.tsx

@@ -1,7 +1,7 @@
 import Box from "@/components/Box";
 import Header from "@/components/Header";
 import { getTranslations } from "next-intl/server";
-import { FC, PropsWithChildren, ReactNode } from "react";
+import { FC, PropsWithChildren, ReactNode, Suspense } from "react";
 import DownloadSection from "./_home/DownloadSection";
 
 import { GroupType } from "@/api/home";
@@ -64,7 +64,7 @@ const Layout: FC<PropsWithChildren<Props>> = async (props) => {
             <Header></Header>
             <main id="maincontainer" className={"main-header"}>
                 {/*弹窗*/}
-                {popupWidget}
+                <Suspense fallback={<div></div>}>{popupWidget}</Suspense>
                 <Box none>
                     <Box>
                         {/* swiper */}