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:
@@ -1,6 +1,6 @@
|
||||
package templates
|
||||
|
||||
templ CustomSectionBuilder(user User, libraries []LibraryData) {
|
||||
templ CustomSectionBuilder(user User, libraries []LibraryData, errorMessage string) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -161,6 +161,8 @@ templ CustomSectionBuilder(user User, libraries []LibraryData) {
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
@ErrorToast(errorMessage)
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user