From 5ee623b295723bf553ead4ce27a8bd0070dd3c40 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Sat, 11 Mar 2023 16:00:50 +0100 Subject: [PATCH] fix: delete button not showing up --- ImageBoardServerApp/Shared/Components/Comment.razor | 4 ++-- ImageBoardServerApp/Shared/Components/Post.razor | 5 +++-- ImageBoardServerApp/Shared/NavMenu.razor | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ImageBoardServerApp/Shared/Components/Comment.razor b/ImageBoardServerApp/Shared/Components/Comment.razor index af64e64..43beaa6 100644 --- a/ImageBoardServerApp/Shared/Components/Comment.razor +++ b/ImageBoardServerApp/Shared/Components/Comment.razor @@ -98,9 +98,9 @@ private ImageData image; private string role; - protected override async Task OnAfterRenderAsync(bool firstRender) + protected override async Task OnParametersSetAsync() { - await base.OnAfterRenderAsync(firstRender); + await base.OnParametersSetAsync(); var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider; var user = await cauthStateProvder.GetAuthenticationStateAsync(); var usr = user.User; diff --git a/ImageBoardServerApp/Shared/Components/Post.razor b/ImageBoardServerApp/Shared/Components/Post.razor index 12ea8fe..e4f5e65 100644 --- a/ImageBoardServerApp/Shared/Components/Post.razor +++ b/ImageBoardServerApp/Shared/Components/Post.razor @@ -169,9 +169,10 @@ toggleText = opened ? "-" : "+"; } - protected override async Task OnAfterRenderAsync(bool firstRender) + + protected override async Task OnParametersSetAsync() { - await base.OnAfterRenderAsync(firstRender); + await base.OnParametersSetAsync(); value = TheManager.getBumpValue(post) + "v"; string boardTag = post.Board; var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider; diff --git a/ImageBoardServerApp/Shared/NavMenu.razor b/ImageBoardServerApp/Shared/NavMenu.razor index cd5b10b..9e3be17 100644 --- a/ImageBoardServerApp/Shared/NavMenu.razor +++ b/ImageBoardServerApp/Shared/NavMenu.razor @@ -5,7 +5,7 @@