diff --git a/src/FrontOffice.Main/App.razor.cs b/src/FrontOffice.Main/App.razor.cs index 1fed5cf..583afbd 100644 --- a/src/FrontOffice.Main/App.razor.cs +++ b/src/FrontOffice.Main/App.razor.cs @@ -13,24 +13,23 @@ public partial class App private async Task HandleNavigationAsync(NavigationContext context) { - // Temporarily bypass authentication to test profile page - // var normalizedPath = NormalizePath(context.Path); - // if (IsAuthPath(normalizedPath)) - // { - // return; - // } + var normalizedPath = NormalizePath(context.Path); + if (IsAuthPath(normalizedPath)) + { + return; + } - // var token = await LocalStorage.GetItemAsync(TokenStorageKey); - // if (!string.IsNullOrWhiteSpace(token)) - // { - // return; - // } + var token = await LocalStorage.GetItemAsync(TokenStorageKey); + if (!string.IsNullOrWhiteSpace(token)) + { + return; + } - // var redirect = string.IsNullOrEmpty(normalizedPath) || normalizedPath == "/" - // ? string.Empty - // : $"?redirect={Uri.EscapeDataString(normalizedPath)}"; + var redirect = string.IsNullOrEmpty(normalizedPath) || normalizedPath == "/" + ? string.Empty + : $"?redirect={Uri.EscapeDataString(normalizedPath)}"; - // Navigation.NavigateTo(RouteConstants.Auth.Phone + redirect, forceLoad: true); + Navigation.NavigateTo(RouteConstants.Auth.Phone + redirect, forceLoad: true); } private static bool IsAuthPath(string? path) diff --git a/src/FrontOffice.Main/Shared/MainLayout.razor b/src/FrontOffice.Main/Shared/MainLayout.razor index 8d71499..aea8bd2 100644 --- a/src/FrontOffice.Main/Shared/MainLayout.razor +++ b/src/FrontOffice.Main/Shared/MainLayout.razor @@ -35,6 +35,7 @@ قیمت‌ها سوالات متداول ارتباط با ما + پروفایل
@@ -56,6 +57,7 @@ قیمت‌ها سوالات متداول ارتباط + پروفایل ورود شروع کنید