I am creating a website/blog with a register/login/logout feature. I am almost done, but having a hard time with the Identities on the .Net8. The scaffolding feature changed and there were no YT videos to reference.
My NavMenu.razor shows the following code:
@inject NavigationManager Navigation<div class="top-row container-fluid"><a class="navbar" href="">WebsiteProject</a><input type="checkbox" title="Navigation menu" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar" /></div><div class="nav-scrollable collapse navbar-collapse" id="navbar"><nav class=""><div class="nav-item px-3"><NavLink class="nav-link" href="" Match="NavLinkMatch.All"> Home</NavLink></div><div class="nav-item px-3"><NavLink class="nav-link" href="Blog"> Blog</NavLink></div></nav></div>@code { private string? currentUrl; protected override void OnInitialized() { currentUrl = NavigationManager.ToBaseRelativePath(NavigationManager.Url); NavigationManager.LocationChanged += OnLocationChanged; } private void OnLocationChanged(object? sender, LocationChangedEventArgs e) { currentUrl = NavigationManager.ToBaseRelativePath(e.Location); StateHasChanged(); } public void Dispose() { NavigationManager.LocationChanged -= OnLocationChanged; }}The following are the error codes that I can't seem to get rid of:
I have searched YT, Google, and even AI to see if it can help me find a way to fix my code, but no answers were found. Hence, I would like someone to help me troubleshoot my code.