mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +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:
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { authApi } from '../api/auth';
|
||||
import { useAuthStore } from '../store/auth';
|
||||
import { useShallow } from 'zustand/shallow';
|
||||
import { consumeCampaignSlug } from '../utils/campaign';
|
||||
import { consumeCampaignSlug, getPendingCampaignSlug } from '../utils/campaign';
|
||||
import { tokenStorage } from '../utils/token';
|
||||
import LanguageSwitcher from '../components/LanguageSwitcher';
|
||||
|
||||
@@ -39,8 +39,9 @@ export default function VerifyEmail() {
|
||||
|
||||
const verify = async () => {
|
||||
try {
|
||||
const campaignSlug = consumeCampaignSlug();
|
||||
const campaignSlug = getPendingCampaignSlug();
|
||||
const response = await authApi.verifyEmail(token, campaignSlug);
|
||||
consumeCampaignSlug();
|
||||
// Save tokens and log user in
|
||||
tokenStorage.setTokens(response.access_token, response.refresh_token);
|
||||
setTokens(response.access_token, response.refresh_token);
|
||||
|
||||
Reference in New Issue
Block a user