mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat: send campaign_slug during standalone email registration
Frontend now reads campaign slug from localStorage and includes it in the registration API call, ensuring campaign attribution works even if email verification happens in a different browser.
This commit is contained in:
@@ -359,12 +359,14 @@ export const useAuthStore = create<AuthState>()(
|
||||
|
||||
registerWithEmail: async (email, password, firstName, referralCode) => {
|
||||
const code = referralCode || getPendingReferralCode() || undefined;
|
||||
const campaignSlug = getPendingCampaignSlug() || undefined;
|
||||
const response = await authApi.registerEmailStandalone({
|
||||
email,
|
||||
password,
|
||||
first_name: firstName,
|
||||
language: navigator.language.split('-')[0] || 'ru',
|
||||
referral_code: code,
|
||||
campaign_slug: campaignSlug,
|
||||
});
|
||||
consumeReferralCode();
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user