Add files via upload

This commit is contained in:
Egor
2026-01-25 09:05:28 +03:00
committed by GitHub
parent 97b2fa319a
commit 13c7d23422
2 changed files with 8 additions and 10 deletions

View File

@@ -63,11 +63,10 @@ export default function Profile() {
staleTime: 60000,
})
// Build referral link
const botUsername = import.meta.env.VITE_TELEGRAM_BOT_USERNAME
const referralLink = referralInfo?.referral_code && botUsername
? `https://t.me/${botUsername}?start=${referralInfo.referral_code}`
: referralInfo?.referral_link || ''
// Build referral link for cabinet
const referralLink = referralInfo?.referral_code
? `${window.location.origin}/login?ref=${referralInfo.referral_code}`
: ''
const copyReferralLink = () => {
if (referralLink) {

View File

@@ -68,11 +68,10 @@ export default function Referral() {
queryFn: referralApi.getReferralInfo,
})
// Build referral link using frontend env variable for correct bot username
const botUsername = import.meta.env.VITE_TELEGRAM_BOT_USERNAME
const referralLink = info?.referral_code && botUsername
? `https://t.me/${botUsername}?start=${info.referral_code}`
: info?.referral_link || ''
// Build referral link for cabinet registration
const referralLink = info?.referral_code
? `${window.location.origin}/login?ref=${info.referral_code}`
: ''
const { data: terms } = useQuery({
queryKey: ['referral-terms'],