From 001673233a0f878c169534f3d8b29bc59b0b7402 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Mon, 22 Jul 2024 06:42:26 +0330 Subject: [PATCH] add starting / to route URLs in Boilerplate #8085 --- .../Components/Layout/NavMenu.razor.cs | 2 +- .../Bit.Boilerplate/src/Shared/Urls.cs | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs index 2bdcfb4ae4..b2b6fc8dc9 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs @@ -26,7 +26,7 @@ protected override async Task OnInitAsync() { Text = Localizer[nameof(AppStrings.Home)], IconName = BitIconName.Home, - Url = "/", + Url = Urls.HomePage, }, //#if (sample == "Admin") new() diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Urls.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Urls.cs index e67f56caca..35829056eb 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Urls.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Urls.cs @@ -3,42 +3,42 @@ namespace Boilerplate.Shared; public static class Urls { - public const string HomePage = ""; + public const string HomePage = "/"; - public const string NotAuthorizedPage = "not-authorized"; + public const string NotAuthorizedPage = "/not-authorized"; - public const string NotFoundPage = "not-found"; + public const string NotFoundPage = "/not-found"; - public const string TermsPage = "terms"; + public const string TermsPage = "/terms"; - public const string ProfilePage = "profile"; + public const string ProfilePage = "/profile"; - public const string ConfirmPage = "confirm"; + public const string ConfirmPage = "/confirm"; - public const string ForgotPasswordPage = "forgot-password"; + public const string ForgotPasswordPage = "/forgot-password"; - public const string ResetPasswordPage = "reset-password"; + public const string ResetPasswordPage = "/reset-password"; - public const string SignInPage = "sign-in"; + public const string SignInPage = "/sign-in"; - public const string SignUpPage = "sign-up"; + public const string SignUpPage = "/sign-up"; //#if (sample == "Admin") - public const string AddOrEditCategoryPage = "add-edit-category"; + public const string AddOrEditCategoryPage = "/add-edit-category"; - public const string CategoriesPage = "categories"; + public const string CategoriesPage = "/categories"; - public const string DashboardPage = "dashboard"; + public const string DashboardPage = "/dashboard"; - public const string ProductsPage = "products"; + public const string ProductsPage = "/products"; //#elif (sample == "Todo") - public const string TodoPage = "todo"; + public const string TodoPage = "/todo"; //#endif //#if (offlineDb == true) - public const string OfflineEditProfilePage = "offline-edit-profile"; + public const string OfflineEditProfilePage = "/offline-edit-profile"; //#endif - public const string AboutPage = "about"; + public const string AboutPage = "/about"; }