From f46f6cced72322fbc1cc0af9a0662f13d499c962 Mon Sep 17 00:00:00 2001 From: ChristopheRib63 <83826573+ChristopheRib63@users.noreply.github.com> Date: Thu, 10 Mar 2022 18:18:01 +0100 Subject: [PATCH] NavMenu refactoring Co-authored-by: crib --- .../Client/Shared/NavMenu.razor | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/AzureIoTHub.Portal/Client/Shared/NavMenu.razor b/src/AzureIoTHub.Portal/Client/Shared/NavMenu.razor index 52807f4a9..78470f78b 100644 --- a/src/AzureIoTHub.Portal/Client/Shared/NavMenu.razor +++ b/src/AzureIoTHub.Portal/Client/Shared/NavMenu.razor @@ -1,11 +1,20 @@ @using AzureIoTHub.Portal.Shared.Security; @using Microsoft.AspNetCore.Components.Authorization +@inject NavigationManager navigationManager Devices - List + + Device List + + + + + Device Models + + IoT Edge @@ -17,10 +26,7 @@ LoRaWAN Management Concentrators } - - Device Models - List - + Settings Device Tags @@ -31,4 +37,8 @@ @code { [Parameter] public bool activateLoRaFeature { get; set; } + + private void AddDevice() => navigationManager.NavigateTo("devices/new"); + private void AddDeviceModel() => navigationManager.NavigateTo("/device-models/new"); + } \ No newline at end of file