ansoni пре 1 месец
родитељ
комит
888ccfde4d

+ 1 - 1
next.config.mjs

@@ -4,7 +4,7 @@ import createNextIntlPlugin from "next-intl/plugin";
 const withNextIntl = createNextIntlPlugin();
 /** @type {import('next').NextConfig} */
 const nextConfig = {
-    output: "standalone",
+    // output: "standalone",
     productionBrowserSourceMaps: true,
     reactStrictMode: false,
     env: {

+ 0 - 0
src/app/[locale]/(TabBar)/[[...share]]/@categoryWidget/page.tsx → src/app/[locale]/(TabBar)/[[...share]]/_categoryWidget/page.tsx


+ 1 - 1
src/app/[locale]/(TabBar)/[[...share]]/_home/HomeCard.tsx

@@ -3,7 +3,7 @@ import { BannerRep } from "@/api/home";
 import Box from "@/components/Box";
 import { FC, PropsWithChildren } from "react";
 import { Swiper, SwiperSlide } from "swiper/react";
-
+// const Box = dynamic(() => import("@/components/Box"));
 interface Props {
     banners: BannerRep[];
 }

+ 0 - 0
src/app/[locale]/(TabBar)/[[...share]]/@mediaWidget/page.tsx → src/app/[locale]/(TabBar)/[[...share]]/_mediaWidget/page.tsx


+ 0 - 0
src/app/[locale]/(TabBar)/[[...share]]/@searchWidget/page.tsx → src/app/[locale]/(TabBar)/[[...share]]/_searchWidget/page.tsx


+ 0 - 0
src/app/[locale]/(TabBar)/[[...share]]/@sportSwiperWidget/SportSwiper.tsx → src/app/[locale]/(TabBar)/[[...share]]/_sportSwiperWidget/SportSwiper.tsx


+ 1 - 1
src/app/[locale]/(TabBar)/[[...share]]/@sportSwiperWidget/page.tsx → src/app/[locale]/(TabBar)/[[...share]]/_sportSwiperWidget/page.tsx

@@ -1,6 +1,6 @@
 import { BannerRep } from "@/api/home";
-import SportSwiper from "@/app/[locale]/(TabBar)/[[...share]]/@sportSwiperWidget/SportSwiper";
 import { server } from "@/utils/server";
+import SportSwiper from "./SportSwiper";
 
 /**
  * 获取体育轮播图

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

@@ -7,7 +7,6 @@ import {
 import Header from "@/components/Header";
 import { getTranslations } from "next-intl/server";
 import { FC, PropsWithChildren, ReactNode, Suspense } from "react";
-
 export const generateMetadata = async () => {
     const t = await getTranslations("titles");
     return {
@@ -85,11 +84,11 @@ const Layout: FC<PropsWithChildren<Props>> = async (props) => {
                     </Box> */}
                 {/* tabs 和 游戏列表 */}
                 <Suspense fallback={<PrizePlaceHolder />}>{children}</Suspense>
-              {/* 大奖 */}
-              <Suspense fallback={<PrizePlaceHolder />}>{prizeWidget}</Suspense>
-              {/*媒体*/}
-              {/*  <div className="mt-[.2rem]">*/}
-                    {/*<Suspense fallback={<Placeholder />}>{mediaWidget}</Suspense>*/}
+                {/* 大奖 */}
+                <Suspense fallback={<PrizePlaceHolder />}>{prizeWidget}</Suspense>
+                {/*媒体*/}
+                {/*  <div className="mt-[.2rem]">*/}
+                {/*<Suspense fallback={<Placeholder />}>{mediaWidget}</Suspense>*/}
                 {/*</div>*/}
                 {/* {React.Children.map(children,(child:any)=>{
                     console.log(child)

+ 2 - 2
src/app/[locale]/(TabBar)/deposit/component/withdraw/index.tsx

@@ -395,7 +395,7 @@ const Withdraw = () => {
                         <Swiper slidesPerView={3} spaceBetween={10} style={{ width: "100%" }}>
                             {currentChannel.channels?.map((item, index) => (
                                 <SwiperSlide key={index}>
-                                    <p
+                                    <div
                                         className={clsx(
                                             styles.buttonItem,
                                             {
@@ -408,7 +408,7 @@ const Withdraw = () => {
                                         <div className="py-[.08rem] text-[.12rem]">
                                             {ChannelEnum[item.type]}
                                         </div>
-                                    </p>
+                                    </div>
                                 </SwiperSlide>
                             ))}
                         </Swiper>

+ 3 - 1
src/app/[locale]/(TabBar)/deposit/layout.tsx

@@ -1,7 +1,9 @@
-import HeaderBack from "@/components/HeaderBack";
+// import HeaderBack from "@/components/HeaderBack";
 import { getTranslations } from "next-intl/server";
+import dynamic from "next/dynamic";
 import { ReactNode, Suspense } from "react";
 
+const HeaderBack = dynamic(() => import("@/components/HeaderBack"), { ssr: false });
 export const generateMetadata = async () => {
     const t = await getTranslations("titles");
     return {

+ 6 - 2
src/app/[locale]/(TabBar)/deposit/page.tsx

@@ -3,12 +3,16 @@ import TipsModal from "@/components/TipsModal";
 import { FundsHandleType, FundsHandleTypeMap } from "@/enums";
 import { useRouter } from "@/i18n/routing";
 import clsx from "clsx";
+import dynamic from "next/dynamic";
 import { useSearchParams } from "next/navigation";
 import React from "react";
 import ReactDom from "react-dom";
-import Deposit from "./component/deposit";
-import Withdraw from "./component/withdraw";
+// import Deposit from "./component/deposit";
+// import Withdraw from "./component/withdraw";
 import styles from "./page.module.scss";
+const Deposit = dynamic(() => import("./component/deposit"));
+const Withdraw = dynamic(() => import("./component/withdraw"));
+// const TipsModal = dynamic(() => import("@/components/TipsModal"));
 
 const Container = () => {
     const searchParams = useSearchParams();

+ 3 - 1
src/app/[locale]/(TabBar)/promo/layout.tsx

@@ -1,7 +1,9 @@
-import HeaderBack from "@/components/HeaderBack";
+// import HeaderBack from "@/components/HeaderBack";
 import { useTranslations } from "next-intl";
+import dynamic from "next/dynamic";
 import { ReactNode, Suspense } from "react";
 
+const HeaderBack = dynamic(() => import("@/components/HeaderBack"), { ssr: false });
 export default function Layout({
     children,
     params: { locale },

+ 6 - 3
src/app/[locale]/(enter)/login/page.tsx

@@ -2,12 +2,15 @@
 import FooterTip from "@/components/FooterTip";
 import { useRouter } from "@/i18n/routing";
 import clsx from "clsx";
+import dynamic from "next/dynamic";
 import { useSearchParams } from "next/navigation";
 import React from "react";
-import Form, { FormType } from "../components/Form";
-import Adbox from "./adbox";
+import { FormType } from "../components/Form";
 import styles from "./index.module.scss";
-import LoginService from "./LoginService";
+
+const Form = dynamic(() => import("../components/Form"));
+const LoginService = dynamic(() => import("./LoginService"));
+const Adbox = dynamic(() => import("./adbox"));
 
 const Login = () => {
     const searchParams = useSearchParams();

+ 0 - 1
src/app/[locale]/layout.tsx

@@ -13,7 +13,6 @@ import { ReactNode, Suspense } from "react";
 import "../editor.scss";
 import "../globals.scss";
 import { Providers } from "./providers";
-
 // 加载字体
 const fontSans = FontSans({
     subsets: ["latin"],

+ 2 - 2
src/components/HeaderBack/index.tsx

@@ -34,7 +34,7 @@ const HeaderBack: FC<PropsWithChildren<HeaderBackProps>> = ({
     Right,
 }) => {
     const t = useTranslations("HeaderBack");
-    const wallet = useWalletStore((state) => state.wallet);
+    const is_open_no_bonus = useWalletStore((state) => state.wallet.is_open_no_bonus);
 
     const iconClassName1 = clsx(
         {
@@ -86,7 +86,7 @@ const HeaderBack: FC<PropsWithChildren<HeaderBackProps>> = ({
             <div className={styles.content}>{children}</div>
             {getToken() && (
                 <div>
-                    {wallet.is_open_no_bonus === 1 && (
+                    {is_open_no_bonus === 1 && (
                         <img src="/img/no_bouns.webp" alt="" className="h-[20px]" />
                     )}
                 </div>