From 30f483fdabf58b17daa391c10525704cd2ca87d4 Mon Sep 17 00:00:00 2001 From: Eric Dugre Date: Mon, 3 Jun 2024 05:57:43 -0400 Subject: [PATCH] apply metadata fix to card body --- src/KInspector.Blazor/Components/Actions/ActionCard.razor | 4 +--- src/KInspector.Blazor/Components/Reports/ReportCard.razor | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/KInspector.Blazor/Components/Actions/ActionCard.razor b/src/KInspector.Blazor/Components/Actions/ActionCard.razor index eef7631d..15f6d0d6 100644 --- a/src/KInspector.Blazor/Components/Actions/ActionCard.razor +++ b/src/KInspector.Blazor/Components/Actions/ActionCard.razor @@ -56,8 +56,6 @@ @code { - private ModuleDetails? moduleDetails; - [Parameter, EditorRequired] public IAction? Action { get; set; } @@ -65,7 +63,7 @@ private ActionOptionForm? Form { get; set; } - private ModuleDetails ModuleDetails => moduleDetails ??= moduleMetadataService.GetModuleDetails(Action!.Codename); + private ModuleDetails ModuleDetails => moduleMetadataService.GetModuleDetails(Action!.Codename); private MarkupString LongDescription => new MarkupString(Markdown.ToHtml(ModuleDetails.LongDescription ?? string.Empty)); diff --git a/src/KInspector.Blazor/Components/Reports/ReportCard.razor b/src/KInspector.Blazor/Components/Reports/ReportCard.razor index b2f0ba24..015e33d7 100644 --- a/src/KInspector.Blazor/Components/Reports/ReportCard.razor +++ b/src/KInspector.Blazor/Components/Reports/ReportCard.razor @@ -45,14 +45,12 @@ @code { - private ModuleDetails? moduleDetails; - [Parameter, EditorRequired] public IReport? Report { get; set; } public ModuleResults Results { get; set; } = new(); - private ModuleDetails ModuleDetails => moduleDetails ??= moduleMetadataService.GetModuleDetails(Report!.Codename); + private ModuleDetails ModuleDetails => moduleMetadataService.GetModuleDetails(Report!.Codename); private MarkupString LongDescription => new MarkupString(Markdown.ToHtml(ModuleDetails.LongDescription ?? string.Empty));