|
@@ -14,7 +14,7 @@ import NumberFlow from "@number-flow/react";
|
|
|
import { useRequest } from "ahooks";
|
|
|
import { Mask, Popup, Toast } from "antd-mobile";
|
|
|
import clsx from "clsx";
|
|
|
-import { useTranslations } from "next-intl";
|
|
|
+import { useLocale, useTranslations } from "next-intl";
|
|
|
import Image from "next/image";
|
|
|
import {
|
|
|
createContext,
|
|
@@ -405,6 +405,7 @@ const phones = Array(9)
|
|
|
const ShareClient = forwardRef<{ open: () => void }, {}>(function ShareClient(props, ref) {
|
|
|
const [visible, setVisible] = useState(false);
|
|
|
const wheel = useContext(WheelContext);
|
|
|
+ const locale = useLocale();
|
|
|
const user = useUserInfoStore((state) => state.userInfo);
|
|
|
const { statusWheel, currentWheel, receiveTarget } = useWheelStore((state) => ({
|
|
|
statusWheel: state.status,
|
|
@@ -424,7 +425,7 @@ const ShareClient = forwardRef<{ open: () => void }, {}>(function ShareClient(pr
|
|
|
// const BASE_URL = window.location.href.replace(pathname, "");
|
|
|
const [BASE_URL, setBaseUrl] = useState("");
|
|
|
|
|
|
- const shareUrl = `${BASE_URL}/sharecwbr?turntable=${currentWheel.id}&user=${user.id}&time=${currentWheel.end_time}`;
|
|
|
+ const shareUrl = `${BASE_URL}/${locale}/sharecwbr?turntable=${currentWheel.id}&user=${user.id}&time=${currentWheel.end_time}`;
|
|
|
const url = encodeURIComponent(`${shareUrl}`);
|
|
|
const text = encodeURIComponent(`Receba 100 BRL de graça,Pix SAQUE RÁPIDO`);
|
|
|
const t = useTranslations();
|