From d23a272304ab8f9c7d754f323716b08b1de5fd2a Mon Sep 17 00:00:00 2001 From: Marcel Kwiatkowski Date: Thu, 15 Feb 2024 01:55:49 +0100 Subject: [PATCH] Fix cancel button navigating to home page instead of meeting details --- src/Components/Pages/MeetingEdition.razor | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Components/Pages/MeetingEdition.razor b/src/Components/Pages/MeetingEdition.razor index bbd9a79..1575a92 100644 --- a/src/Components/Pages/MeetingEdition.razor +++ b/src/Components/Pages/MeetingEdition.razor @@ -13,9 +13,9 @@ @if (_meeting.UserId != User.Id) {
-

Access Denied

-

You do not have permission to edit this meeting.

-
+

Access Denied

+

You do not have permission to edit this meeting.

+ return; } @@ -23,7 +23,7 @@

Edit Meeting

- Cancel + Cancel Save
@@ -52,9 +52,12 @@ } } - private void NavigateToHomePage() + private void NavigateToDetails() { - NavigationManager.NavigateTo("/"); + if (_meeting != null) + { + NavigationManager.NavigateTo($"/m/{_meeting.Code}"); + } } private async Task SaveChangesAsync() @@ -67,7 +70,7 @@ } await MeetingManager.UpdateAsync(_meeting); - NavigationManager.NavigateTo($"/m/{_meeting.Code}"); + NavigateToDetails(); } } }