|
@@ -21,7 +21,8 @@ const WSport=({})=>{
|
|
|
const navigate=useNavigate();
|
|
const navigate=useNavigate();
|
|
|
const dispatch=useDispatch();
|
|
const dispatch=useDispatch();
|
|
|
const {pathname} = useLocation();
|
|
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 ()=>{
|
|
const refreshToken=async ()=>{
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
dispatch(reqGameInfo()).then(({payload})=>{
|
|
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])
|
|
},[pathname])
|
|
|
useEffect(()=>{
|
|
useEffect(()=>{
|
|
|
if (objInfo.bt){
|
|
if (objInfo.bt){
|