refactor(templates): add error toast support to page templates

Update all page templates to accept an optional error message parameter
and display it via the ErrorToast component when data loading fails.
This commit is contained in:
2026-02-20 13:25:49 -05:00
parent 7c652d5a3a
commit 0c515a277c
22 changed files with 198 additions and 142 deletions
+3 -1
View File
@@ -2,7 +2,7 @@ package templates
import "bookhoard/internal/handlers"
templ Conflicts(user User, conflicts []handlers.ConflictDetailResponse, total int, unresolved int) {
templ Conflicts(user User, conflicts []handlers.ConflictDetailResponse, total int, unresolved int, errorMessage string) {
<!DOCTYPE html>
<html lang="en">
<head>
@@ -232,6 +232,8 @@ templ Conflicts(user User, conflicts []handlers.ConflictDetailResponse, total in
</div>
<script src="/static/conflicts.js"></script>
@ErrorToast(errorMessage)
</body>
</html>
}