Files
jsmr/JSMR.UI.Blazor/Pages/VoiceWorks.razor
Brian Bicknell 840bec72d2
All checks were successful
ci / build-test (push) Successful in 1m35s
ci / publish-image (push) Has been skipped
Added Blazor projects. Minor API/core updates.
2025-11-07 22:18:04 -05:00

46 lines
873 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@page "/voiceworks"
@using JSMR.Application.VoiceWorks.Queries.Search
@inject VoiceWorksClient Client
<PageTitle>Voice Works</PageTitle>
<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>
}
@code {
List<VoiceWorkSearchResult>? items;
protected override async Task OnInitializedAsync()
{
SearchVoiceWorksRequest request = new(
Options: new()
);
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();
}
}