|
@@ -2,14 +2,14 @@
|
|
|
import { claimActivityReward, getPromoterInfo, PromoterInfo, PromoterItem } from "@/api/activity";
|
|
|
import { getShareLinkApi } from "@/api/config";
|
|
|
import GlobalNotify from "@/components/ModalPopup/GlobalNotifyModal";
|
|
|
-import { useRouter } from "@/i18n/routing";
|
|
|
+import { usePathname, useRouter } from "@/i18n/routing";
|
|
|
import { useUserInfoStore } from "@/stores/useUserInfoStore";
|
|
|
import { formatAmount } from "@/utils";
|
|
|
import { copyText } from "@/utils/methods";
|
|
|
import { Toast } from "antd-mobile";
|
|
|
import clsx from "clsx";
|
|
|
import { useTranslations } from "next-intl";
|
|
|
-import { usePathname, useSearchParams } from "next/navigation";
|
|
|
+import { useSearchParams } from "next/navigation";
|
|
|
import React from "react";
|
|
|
import styles from "./page.module.scss";
|
|
|
|
|
@@ -131,9 +131,8 @@ const Page: React.FC = () => {
|
|
|
const init = async () => {
|
|
|
const res = await getShareLinkApi();
|
|
|
if (res.code === 200) {
|
|
|
- const url =
|
|
|
- res.data.find((item) => item.type === 2)?.url ??
|
|
|
- window.location.href.replace(pathname, "");
|
|
|
+ const localUrl = window.location.href.split(pathname)[0];
|
|
|
+ const url = res.data.find((item) => item.type === 2)?.url ?? localUrl;
|
|
|
setBaseUrl(url);
|
|
|
}
|
|
|
};
|
|
@@ -200,7 +199,7 @@ const Page: React.FC = () => {
|
|
|
>
|
|
|
<div
|
|
|
className={clsx(
|
|
|
- "mr-[.1rem] overflow-hidden text-ellipsis whitespace-nowrap"
|
|
|
+ "mr-[.1rem] flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-[.12rem]"
|
|
|
)}
|
|
|
>
|
|
|
Meu link:{decodeURIComponent(url)}
|