@using SteUp.Shared.Core.Interface.System.Network @inject INetworkService NetworkService @inject IDialogService Dialog
@code { private bool IsVisible { get; set; } = true; private bool PlusVisible { get; set; } = true; protected override Task OnInitializedAsync() { NavigationManager.LocationChanged += (_, args) => { var location = args.Location.Remove(0, NavigationManager.BaseUri.Length); var newIsVisible = new List { "ispezioni", "user" } .Contains(location); var newPlusVisible = new List { "ispezioni", "user" } .Contains(location); if (IsVisible == newIsVisible && PlusVisible == newPlusVisible) return; IsVisible = newIsVisible; PlusVisible = newPlusVisible; StateHasChanged(); }; return Task.CompletedTask; } private void NewActivity() { _ = ModalHelper.OpenSelectShop(Dialog); } }