u
This commit is contained in:
@@ -57,4 +57,19 @@ public partial class MainLayout
|
||||
{
|
||||
Navigation.NavigateTo(RouteConstants.Profile.Index);
|
||||
}
|
||||
|
||||
private async Task Logout()
|
||||
{
|
||||
await LocalStorage.RemoveItemAsync(TokenStorageKey);
|
||||
await LocalStorage.RemoveItemAsync("auth:phone-number");
|
||||
await LocalStorage.RemoveItemAsync("auth:redirect");
|
||||
await LocalStorage.RemoveItemAsync("referral:code");
|
||||
|
||||
_isAuthenticated = false;
|
||||
Snackbar.Add("با موفقیت از حساب کاربری خارج شدید.", Severity.Success);
|
||||
StateHasChanged();
|
||||
|
||||
// Navigate to home page
|
||||
Navigation.NavigateTo(RouteConstants.Main.MainPage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user