From 47152ab05e5ced6e860dda3203a393e5d213af0e Mon Sep 17 00:00:00 2001 From: MeysamMoghaddam <65253484+MeysamMoghaddam@users.noreply.github.com> Date: Tue, 7 Oct 2025 22:51:50 +0330 Subject: [PATCH] Update App.razor.cs --- src/FrontOffice.Main/App.razor.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/FrontOffice.Main/App.razor.cs b/src/FrontOffice.Main/App.razor.cs index 583afbd..911c974 100644 --- a/src/FrontOffice.Main/App.razor.cs +++ b/src/FrontOffice.Main/App.razor.cs @@ -15,15 +15,11 @@ public partial class App { var normalizedPath = NormalizePath(context.Path); if (IsAuthPath(normalizedPath)) - { return; - } var token = await LocalStorage.GetItemAsync(TokenStorageKey); if (!string.IsNullOrWhiteSpace(token)) - { return; - } var redirect = string.IsNullOrEmpty(normalizedPath) || normalizedPath == "/" ? string.Empty @@ -35,14 +31,10 @@ public partial class App private static bool IsAuthPath(string? path) { if (string.IsNullOrWhiteSpace(path)) - { return false; - } if (Uri.TryCreate(path, UriKind.Absolute, out var absolute)) - { path = absolute.PathAndQuery; - } path = path.TrimStart('/'); return path.StartsWith("auth", StringComparison.OrdinalIgnoreCase); @@ -51,14 +43,10 @@ public partial class App private static string NormalizePath(string? path) { if (string.IsNullOrWhiteSpace(path)) - { return string.Empty; - } if (Uri.TryCreate(path, UriKind.Absolute, out var absolute)) - { path = absolute.PathAndQuery; - } return path.StartsWith('/') ? path : "/" + path; }