From aec84f6d67ae6c1e0b7c01f8c1eb331e263798dc Mon Sep 17 00:00:00 2001 From: d11n Date: Fri, 23 Jun 2023 11:31:05 +0200 Subject: [PATCH] Dashboard: Limit "Top Items" to five (#5110) Feedback we got at BTCPrague: Do not show more than five items in the top list, because otherwise the list can get very long if there's a POS with many items. --- BTCPayServer/Components/AppTopItems/AppTopItems.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Components/AppTopItems/AppTopItems.cs b/BTCPayServer/Components/AppTopItems/AppTopItems.cs index 719304c67..87d4a5e38 100644 --- a/BTCPayServer/Components/AppTopItems/AppTopItems.cs +++ b/BTCPayServer/Components/AppTopItems/AppTopItems.cs @@ -40,7 +40,7 @@ public class AppTopItems : ViewComponent var app = HttpContext.GetAppData(); var entries = await _appService.GetItemStats(app); vm.SalesCount = entries.Select(e => e.SalesCount).ToList(); - vm.Entries = entries.ToList(); + vm.Entries = entries.Take(5).ToList(); vm.AppType = app.AppType; vm.AppUrl = await appBaseType.ConfigureLink(app); vm.Name = app.Name;