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:
@@ -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