|
@@ -1,6 +1,7 @@
|
|
|
"use client";
|
|
|
|
|
|
import { getWheelReceiveApi } from "@/api/cashWheel";
|
|
|
+import { getShareLinkApi } from "@/api/config";
|
|
|
import Box from "@/components/Box";
|
|
|
import { WheelClient } from "@/components/ModalPopup/WheelModal";
|
|
|
import useCountDown from "@/hooks/useCountdown";
|
|
@@ -201,7 +202,6 @@ const WheelWallet = () => {
|
|
|
}));
|
|
|
const [count, setCount] = useState<number>(0);
|
|
|
useEffect(() => {
|
|
|
- console.log(`🚀🚀🚀🚀🚀-> in CashWheelClient.tsx on 252`, currentWheel);
|
|
|
setCount(currentWheel.amount || 0);
|
|
|
}, [currentWheel.amount]);
|
|
|
return (
|
|
@@ -471,7 +471,12 @@ const ShareClient = forwardRef<{ open: () => void }, {}>(function ShareClient(pr
|
|
|
window.location.href = phoneNumber;
|
|
|
};
|
|
|
useEffect(() => {
|
|
|
- setBaseUrl(window.location.href.replace(pathname, ""));
|
|
|
+ getShareLinkApi().then((res) => {
|
|
|
+ const url =
|
|
|
+ res.data.find((item) => item.type === 1)?.url ??
|
|
|
+ window.location.href.replace(pathname, "");
|
|
|
+ setBaseUrl(url);
|
|
|
+ });
|
|
|
}, []);
|
|
|
return (
|
|
|
<>
|