diff --git a/templates/books_grid.templ b/templates/books_grid.templ
index 94cc371..b6ca5ca 100644
--- a/templates/books_grid.templ
+++ b/templates/books_grid.templ
@@ -3,7 +3,6 @@ package templates
import "bookhoard/internal/handlers"
templ BooksGrid(books []handlers.BookInfo, limit int, offset int, count int, currentLibraryID string) {
-
if len(books) > 0 {
for _, book := range books {
@BookCard(book)
@@ -15,34 +14,4 @@ templ BooksGrid(books []handlers.BookInfo, limit int, offset int, count int, cur
Try adjusting your filters or add some books to your library.
}
-
-
-
}
diff --git a/templates/books_grid_templ.go b/templates/books_grid_templ.go
index cd61086..99606d6 100644
--- a/templates/books_grid_templ.go
+++ b/templates/books_grid_templ.go
@@ -31,10 +31,6 @@ func BooksGrid(books []handlers.BookInfo, limit int, offset int, count int, curr
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
if len(books) > 0 {
for _, book := range books {
templ_7745c5c3_Err = BookCard(book).Render(ctx, templ_7745c5c3_Buffer)
@@ -43,58 +39,11 @@ func BooksGrid(books []handlers.BookInfo, limit int, offset int, count int, curr
}
}
} else {
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
📚 No books found
Try adjusting your filters or add some books to your library.
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "
📚 No books found
Try adjusting your filters or add some books to your library.
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
return nil
})
}