diff --git a/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor b/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor
index a88c985..f9d34c6 100644
--- a/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor
+++ b/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor
@@ -1,6 +1,5 @@
@inject NavigationManager Navigation
-
@@ -28,7 +27,7 @@
- @foreach (var item in wishlist)
+ @foreach (var item in Wishlists)
{
RedirectToPage(item.Id)" class="wishlist_name" >@item.Name
@@ -91,8 +90,6 @@
@code {
-
-
private void RedirectToPage(string itemId) {
var url = $"/chat/{itemId}";
Navigation.NavigateTo(url);
@@ -107,28 +104,6 @@
}
private void DeleteWishlist(string itemId) {
-
}
-
-
-
- private List wishlist;
-
- protected override async Task OnInitializedAsync()
- {
-
- wishlist = new List
- {
- new Models.Wishlist {Id = "0", Name = "Gift for Jessica", Type="product", CreateById="0"},
- new Models.Wishlist {Id = "1", Name = "Secret Santa", Type="gift", CreateById="1"},
- new Models.Wishlist {Id = "2", Name = "Mark’s Birthday", Type="product", CreateById="2"},
- new Models.Wishlist {Id = "3", Name = "Garden tools", Type="product", CreateById="2"},
- new Models.Wishlist {Id = "4", Name = "Phone charger ", Type="product", CreateById="2"},
- new Models.Wishlist {Id = "5", Name = "Garden tools", Type="product", CreateById="2"}
- };
-
- }
-
-
}
diff --git a/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor.cs b/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor.cs
index b31509d..7cb303a 100644
--- a/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor.cs
+++ b/ShoppingAssistantWebClient.Web/Shared/NavMenu.razor.cs
@@ -1,25 +1,23 @@
-
-using Microsoft.AspNetCore.Components;
-using ShoppingAssistantWebClient.Web.Models;
-
-namespace ShoppingAssistantWebClient.Web.Pages;
-
-public partial class Wishlists : ComponentBase
-{
-private List wishlist;
-
- protected override async Task OnInitializedAsync()
- {
-
- wishlist = new List
- {
- new Models.Wishlist {Id = "0", Name = "Gift for Jessica", Type="product", CreateById="0"},
- new Models.Wishlist {Id = "1", Name = "Secret Santa", Type="gift", CreateById="1"},
- new Models.Wishlist {Id = "2", Name = "Mark’s Birthday", Type="product", CreateById="2"},
- new Models.Wishlist {Id = "3", Name = "Garden tools", Type="product", CreateById="2"},
- new Models.Wishlist {Id = "4", Name = "Phone charger ", Type="product", CreateById="2"},
- new Models.Wishlist {Id = "5", Name = "Garden tools", Type="product", CreateById="2"}
- };
-
- }
-}
+using Microsoft.AspNetCore.Components;
+using ShoppingAssistantWebClient.Web.Models;
+
+namespace ShoppingAssistantWebClient.Web.Shared
+{
+ public partial class NavMenu : ComponentBase
+ {
+
+ public List Wishlists = new()
+ {
+ new Wishlist {Id = "0", Name = "Gift for Jessica", Type="product", CreateById="0"},
+ new Wishlist {Id = "1", Name = "Secret Santa", Type="gift", CreateById="1"},
+ new Wishlist {Id = "2", Name = "Mark’s Birthday", Type="product", CreateById="2"}
+ };
+
+ protected override async Task OnInitializedAsync()
+ {
+ // Get data from Back-end
+ }
+
+ }
+
+}