Updated CI for Blazor WebAssembly. Added styles for product cards.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@page "/voiceworks"
|
||||
@using JSMR.Application.VoiceWorks.Queries.Search
|
||||
@using JSMR.UI.Blazor.Components
|
||||
@using JSMR.UI.Blazor.Services
|
||||
@inject VoiceWorksClient Client
|
||||
|
||||
@@ -7,26 +8,10 @@
|
||||
|
||||
<h3>VoiceWorks</h3>
|
||||
|
||||
@if (items is null)
|
||||
{
|
||||
<p>Loading…</p>
|
||||
}
|
||||
else if (items.Count == 0)
|
||||
{
|
||||
<p>No results.</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul>
|
||||
@foreach (var v in items)
|
||||
{
|
||||
<li>@v.ProductId – @v.ProductName</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
<JProductCollection Products="items"></JProductCollection>
|
||||
|
||||
@code {
|
||||
List<VoiceWorkSearchResult>? items;
|
||||
VoiceWorkSearchResult[]? items;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -36,12 +21,6 @@ else
|
||||
|
||||
var result = await Client.SearchAsync(request);
|
||||
|
||||
// if (result.Ok)
|
||||
// {
|
||||
// items = result.Value!.Results.Items.ToList();
|
||||
// }
|
||||
//items = result.Value?.Results.Items ?? [];
|
||||
|
||||
items = result.Results.Items.ToList();
|
||||
items = result?.Results.Items ?? [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user