u
This commit is contained in:
@@ -158,6 +158,14 @@ public partial class AuthDialog : IDisposable
|
||||
try
|
||||
{
|
||||
_verifyRequest.Mobile = _phoneNumber;
|
||||
|
||||
// Check for stored referral code and add it to the request
|
||||
var storedReferralCode = await LocalStorage.GetItemAsync<string>("referral:code");
|
||||
if (!string.IsNullOrWhiteSpace(storedReferralCode))
|
||||
{
|
||||
_verifyRequest.ParentReferralCode = storedReferralCode;
|
||||
}
|
||||
|
||||
var validationResult = _verifyRequestValidator.Validate(_verifyRequest);
|
||||
if (!validationResult.IsValid)
|
||||
{
|
||||
@@ -196,6 +204,9 @@ public partial class AuthDialog : IDisposable
|
||||
await LocalStorage.RemoveItemAsync(PhoneStorageKey);
|
||||
await LocalStorage.RemoveItemAsync(RedirectStorageKey);
|
||||
|
||||
// Clear referral code after successful registration/login
|
||||
await LocalStorage.RemoveItemAsync("referral:code");
|
||||
|
||||
_attemptsLeft = MaxVerificationAttempts;
|
||||
_verifyRequest.Code = string.Empty;
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
else
|
||||
{
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Inherit" OnClick="OpenAuthDialog">ورود</MudButton>
|
||||
<MudButton Color="Color.Primary">شروع کنید</MudButton>
|
||||
}
|
||||
</MudHidden>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user