zhejiushizhuce %!s(int64=2) %!d(string=hai) anos
pai
achega
ffb8f6af93
Modificáronse 3 ficheiros con 18 adicións e 2 borrados
  1. 2 1
      src/constants/routes.js
  2. 13 1
      src/widgets/WSport/index.jsx
  3. 3 0
      src/widgets/WWelfarebar/index.jsx

+ 2 - 1
src/constants/routes.js

@@ -40,7 +40,8 @@ const ROUTE_PATH={
     SERVICES:"#/services",
     KYC:"#/kyc",
     CHECK_IN:"#/checkIn",
-    SPORTS:"/sports"
+    SPORTS:"/sports",
+    RACING:"/racing"
 }
 
 export {

+ 13 - 1
src/widgets/WSport/index.jsx

@@ -21,7 +21,8 @@ const WSport=({})=>{
     const navigate=useNavigate();
     const dispatch=useDispatch();
     const {pathname} = useLocation();
-    const [sportPath,setSportPath]=useState("/")
+    const tempSPath=pathname.startsWith(ROUTE_PATH.RACING)?"/horse-racing-55":"/";
+    const [sportPath,setSportPath]=useState(tempSPath)
     const refreshToken=async ()=>{
         return new Promise((resolve, reject) => {
             dispatch(reqGameInfo()).then(({payload})=>{
@@ -94,6 +95,17 @@ const WSport=({})=>{
                 })
             }
         }
+        else if (pathname.startsWith(ROUTE_PATH.RACING))
+        {
+            let sub=pathname.replace(ROUTE_PATH.RACING,"");
+            if (sub==="")sub="/horse-racing-55";
+            setSportPath(sub);
+            if (objInfo.bt){
+                objInfo.bt.updateOptions({
+                    url:sub
+                })
+            }
+        }
     },[pathname])
     useEffect(()=>{
         if (objInfo.bt){

+ 3 - 0
src/widgets/WWelfarebar/index.jsx

@@ -169,6 +169,9 @@ const WWelfarebar = () => {
         if (pathname.startsWith(ROUTE_PATH.SPORTS)){
             isClose=true;
         }
+        else if(pathname.startsWith(ROUTE_PATH.RACING)){
+            isClose=true;
+        }
         const stars=Array.from({ length: 5 }, (_, index) => index);
         return (
             <div className={`${styles.container} ${extra}`}>