fix(templates): fix ErrorToast rendering literal { message } instead of error text
ErrorToast used Go string literal '{ message }' instead of templ
interpolation, so the actual error message was never shown — just the
literal text "{ message }" appeared in the toast.
This commit is contained in:
1 parent
504f145f64
commit
71832bee24
2 files changed
+16
-3
No files matched your search
@@ -2,6 +2,6 @@ package templates
|
||||
|
||||
templ ErrorToast(message string) {
|
||||
if message != "" {
|
||||
<div x-data="toastError" x-init="showErrorToast('{ message }')"></div>
|
||||
<div x-data="toastError" x-init={ "showErrorToast('" + message + "')" }></div>
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user