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.
8 lines
160 B
Templ
8 lines
160 B
Templ
package templates
|
|
|
|
templ ErrorToast(message string) {
|
|
if message != "" {
|
|
<div x-data="toastError" x-init={ "showErrorToast('" + message + "')" }></div>
|
|
}
|
|
}
|