Merge pull request '/failed-builds: special case no failed builds' (#148) from fix-142 into main

Reviewed-on: https://git.robur.io/robur/builder-web/pulls/148
This commit is contained in:
Reynir Björnsson 2022-11-14 13:21:11 +00:00
commit 3bb8925bd3

View file

@ -943,7 +943,14 @@ let failed_builds ~start ~count builds =
] ]
in in
layout ~title:"Failed builds" layout ~title:"Failed builds"
([ (match builds with
| [] ->
[
H.h1 [H.txt "No failed builds to list"];
H.p [H.txt "🥳"];
]
| _ :: _ ->
[
H.h1 [H.txt "Failed builds"]; H.h1 [H.txt "Failed builds"];
H.ul (List.map build builds); H.ul (List.map build builds);
H.p [ txtf "View the next %d failed builds " count; H.p [ txtf "View the next %d failed builds " count;