package templates import ( "bookhoard/internal/handlers" "fmt" ) templ BrowseDetail(user User, badgeIcon string, badgeLabel string, title string, pageTitle string, backUrl string, backLabel string, emptyIcon string, emptyMessage string, books []handlers.BookInfo, errorMessage string) { { pageTitle } - Bookhoard @Header(user, backUrl)
@Icon("arrow-left", "h-4 w-4") { backLabel }
{ badgeIcon } { badgeLabel }

{ title }

{ fmt.Sprintf("%d", len(books)) } books
if len(books) > 0 {
for _, book := range books { @BookCard(book) }
} else {
{ emptyIcon }

No Books Found

{ emptyMessage }

}
@ErrorToast(errorMessage) }