浏览代码

fix: env file

Before 1 年之前
父节点
当前提交
769cfde0b3
共有 6 个文件被更改,包括 19 次插入19 次删除
  1. 0 4
      .env
  2. 1 0
      .env.development
  3. 4 0
      .env.production
  4. 10 10
      src/components/Card/Card.tsx
  5. 2 2
      src/components/Header/index.tsx
  6. 2 3
      src/utils/server/index.ts

+ 0 - 4
.env

@@ -1,4 +0,0 @@
-
-BASE_URL=http://206.168.191.125:8800
-
-

+ 1 - 0
.env.development

@@ -0,0 +1 @@
+NEXT_PUBLIC_BASE_URL=http://206.168.191.125:8800

+ 4 - 0
.env.production

@@ -0,0 +1,4 @@
+
+NEXT_PUBLIC_BASE_URL=http://206.168.191.125:8800
+
+

+ 10 - 10
src/components/Card/Card.tsx

@@ -77,16 +77,16 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
                                         <p className={"h-[0.6rem]"}>{item?.game_name_cn}</p>
 
                                         <div className={"flex w-[2.2rem] justify-around"}>
-                                            <Button
-                                                onClick={playGameHandler}
-                                                className={
-                                                    "h-[0.39rem] w-[0.89rem] rounded-[0.05rem] text-[0.15rem]" +
-                                                    " bg-[#3a3a3a]" +
-                                                    " font-bold"
-                                                }
-                                            >
-                                                {t("demo")}
-                                            </Button>
+                                            {/*<Button*/}
+                                            {/*    onClick={playGameHandler}*/}
+                                            {/*    className={*/}
+                                            {/*        "h-[0.39rem] w-[0.89rem] rounded-[0.05rem] text-[0.15rem]" +*/}
+                                            {/*        " bg-[#3a3a3a]" +*/}
+                                            {/*        " font-bold"*/}
+                                            {/*    }*/}
+                                            {/*>*/}
+                                            {/*    {t("demo")}*/}
+                                            {/*</Button>*/}
                                             <Button
                                                 onClick={playGameHandler}
                                                 className={`h-[0.39rem] w-[0.89rem] rounded-[0.05rem] bg-[#009d80] text-[0.15rem] font-bold`}

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

@@ -45,8 +45,8 @@ const DefaultHeader: FC<HeaderProps> = (props) => {
                         </>
                     ) : (
                         <>
-                            <Link href={"/login?redirect=/withdraw"}>{t("login")}</Link>
-                            <Link href={"/login?redirect=/withdraw"} className={styles.rightActive}>
+                            <Link href={"/login?redirect=/"}>{t("login")}</Link>
+                            <Link href={"/login?redirect=/"} className={styles.rightActive}>
                                 {t("register")}
                             </Link>
                         </>

+ 2 - 3
src/utils/server/index.ts

@@ -1,11 +1,10 @@
 "use client";
 import Request from "./axios";
 
-const BASE_URL = process.env.BASE_URL;
-console.log(`🎯🎯🎯🎯🎯-> in index.ts on 5`, process);
+const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
 const server = new Request({
     timeout: 10 * 1000,
-    baseURL: "http://206.168.191.125:8800",
+    baseURL: BASE_URL,
     transform: {
         // instance  interceptor
         requestInterceptor: (config) => {