From 11ea821f529e006b09b38898d61d23062446113b Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Fri, 13 Dec 2024 19:39:39 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(config):=20Subscribe=20Link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/user/config/use-global.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/user/config/use-global.tsx b/apps/user/config/use-global.tsx index f246602..0902fad 100644 --- a/apps/user/config/use-global.tsx +++ b/apps/user/config/use-global.tsx @@ -1,8 +1,6 @@ import { NEXT_PUBLIC_API_URL, NEXT_PUBLIC_SITE_URL } from '@/config/constants'; import { queryUserInfo } from '@/services/user/user'; import { extractDomain } from '@repo/ui/utils'; -import Base64 from 'crypto-js/enc-base64'; -import UTF8 from 'crypto-js/enc-utf8'; import { create } from 'zustand'; export interface GlobalStore { @@ -81,14 +79,12 @@ export const useGlobalStore = create((set, get) => ({ : [extractDomain(NEXT_PUBLIC_API_URL || NEXT_PUBLIC_SITE_URL || '', pan_domain)]; return domains.map((domain) => { - const enc_type = type ? Base64.stringify(UTF8.parse(type)) : ''; - const enc_uuid = Base64.stringify(UTF8.parse(uuid)); if (pan_domain) { - if (enc_type) return `https://${enc_type}.${enc_uuid}.${domain}`; - return `https://${enc_uuid}.${domain}`; + if (type) return `https://${uuid}.${type}.${domain}`; + return `https://${uuid}.${domain}`; } else { - if (enc_type) return `https://${domain}${subscribe_path}?mark=${enc_uuid}&type=${enc_type}`; - return `https://${domain}${subscribe_path}?mark=${enc_uuid}`; + if (type) return `https://${domain}${subscribe_path}?mark=${uuid}&type=${type}`; + return `https://${domain}${subscribe_path}?mark=${uuid}`; } }); },