mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
Add files via upload
This commit is contained in:
@@ -63,11 +63,10 @@ export default function Profile() {
|
|||||||
staleTime: 60000,
|
staleTime: 60000,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Build referral link
|
// Build referral link for cabinet
|
||||||
const botUsername = import.meta.env.VITE_TELEGRAM_BOT_USERNAME
|
const referralLink = referralInfo?.referral_code
|
||||||
const referralLink = referralInfo?.referral_code && botUsername
|
? `${window.location.origin}/login?ref=${referralInfo.referral_code}`
|
||||||
? `https://t.me/${botUsername}?start=${referralInfo.referral_code}`
|
: ''
|
||||||
: referralInfo?.referral_link || ''
|
|
||||||
|
|
||||||
const copyReferralLink = () => {
|
const copyReferralLink = () => {
|
||||||
if (referralLink) {
|
if (referralLink) {
|
||||||
|
|||||||
@@ -68,11 +68,10 @@ export default function Referral() {
|
|||||||
queryFn: referralApi.getReferralInfo,
|
queryFn: referralApi.getReferralInfo,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Build referral link using frontend env variable for correct bot username
|
// Build referral link for cabinet registration
|
||||||
const botUsername = import.meta.env.VITE_TELEGRAM_BOT_USERNAME
|
const referralLink = info?.referral_code
|
||||||
const referralLink = info?.referral_code && botUsername
|
? `${window.location.origin}/login?ref=${info.referral_code}`
|
||||||
? `https://t.me/${botUsername}?start=${info.referral_code}`
|
: ''
|
||||||
: info?.referral_link || ''
|
|
||||||
|
|
||||||
const { data: terms } = useQuery({
|
const { data: terms } = useQuery({
|
||||||
queryKey: ['referral-terms'],
|
queryKey: ['referral-terms'],
|
||||||
|
|||||||
Reference in New Issue
Block a user