@page "/ProductsByCategory/{CategoryId:int}"
@inherits ProductsByCategoryBase

@if (Products == null && ErrorMessage == null)
{
    <div class="row d-flex justify-content-center">
        <div class="col-md-1">
            <DisplayCustomSpinner />
        </div>
    </div>
}
else if (ErrorMessage != null)
{
    <DisplayError ErrorMessage="@ErrorMessage" />
}
else {
    <h2>@CategoryName</h2>
    @if(Products.Count() > 0) 
    {
        <div class="row mt-3">
            <DisplayProducts Products="@Products"></DisplayProducts>
        </div>
    }
}