mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: batch bug fixes matching backend changes
- Promo code errors: add inactive/not_yet_valid translations (4 locales) + Balance.tsx parser - Daily 100% discount: render price block when originalDailyPrice > 0 - Webvisor: enable in Yandex Metrika init config - Referral attribution: consume campaign/referral slugs only after successful auth (all login methods) - registerWithEmail: consume referral code after success - AdminSettings: move TARIFF_MODE_SETTINGS to module scope (fix eslint warning)
This commit is contained in:
@@ -7,7 +7,7 @@ import { brandingApi, type TelegramWidgetConfig } from '../api/branding';
|
||||
import { authApi } from '../api/auth';
|
||||
import { useAuthStore } from '../store/auth';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { consumeCampaignSlug } from '../utils/campaign';
|
||||
import { getPendingCampaignSlug } from '../utils/campaign';
|
||||
import { copyToClipboard } from '../utils/clipboard';
|
||||
|
||||
interface TelegramLoginButtonProps {
|
||||
@@ -253,7 +253,7 @@ export default function TelegramLoginButton({ referralCode }: TelegramLoginButto
|
||||
// bot users where referrals don't apply. Leaving it in localStorage allows
|
||||
// other auth methods (OIDC, widget) to pick it up if the user switches paths.
|
||||
if (!codesConsumedRef.current) {
|
||||
capturedCampaignRef.current = consumeCampaignSlug();
|
||||
capturedCampaignRef.current = getPendingCampaignSlug();
|
||||
codesConsumedRef.current = true;
|
||||
}
|
||||
const capturedCampaign = capturedCampaignRef.current;
|
||||
|
||||
Reference in New Issue
Block a user