ソースを参照

fix: 更新配置undefined导致报错

Before 6 ヶ月 前
コミット
807a25006c

+ 1 - 1
src/app/[locale]/(wheel)/cashWheel/CashWheelClient.tsx

@@ -421,7 +421,7 @@ const ShareClient = forwardRef<{ open: () => void }, {}>(function ShareClient(pr
 
     const [currentPhoneIndex, setCurrentPhoneIndex] = useState(0);
 
-    const shareUrl = `${globalThis.config.NEXT_PUBLIC_SHARE_URL}/br/sharecwbr?turntable=${currentWheel.id}&user=${user.id}&time=${currentWheel.end_time}`;
+    const shareUrl = `${globalThis.config?.NEXT_PUBLIC_SHARE_URL ?? ""}/br/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();

+ 1 - 1
src/app/[locale]/affiliate/summary/page.tsx

@@ -178,7 +178,7 @@ const App: FC<Props> = (props) => {
     const token = getToken();
 
     // 生成分享链接
-    const BASE_URL = globalThis.config.NEXT_PUBLIC_SHARE_URL;
+    const BASE_URL = globalThis.config?.NEXT_PUBLIC_SHARE_URL ?? "";
     const shareUrl = `${BASE_URL}/${locale}/${userInfo ? userInfo.referrer_code : "xxxxxx"}`;
 
     const url = encodeURIComponent(`${shareUrl}`);