TheShopCritics2/TSC2/Components/Pages/BrowseState.razor

38 lines
966 B
Plaintext
Raw Normal View History

@page "/browse/{State}"
@using TSC2.Components.CSharp;
<h1>@State</h1>
<h2>@results</h2>
<ul>
@foreach(Tuple<string, string, string, float> current in filterResults)
{
<li><a href="/info/@current.Item2&@current.Item1">@current.Item4 * | @current.Item2 | @current.Item3</a></li>
}
</ul>
@code {
[Parameter]
public string State { get; set; } = "MI";
private string results = "No results found.";
private List<Tuple<string,string,string,float>> filterResults = new();
protected override Task OnInitializedAsync()
{
filterResults = DatabaseManager.FilterByState(State);
if (filterResults.Count == 0)
return Task.FromResult(0);
this.results = "Results:\n";
return Task.FromResult(0);
/*foreach (Tuple<string, string, string, float> current in results)
{
}*/
}
}