package components import ( "encoding/base64" "github.com/skip2/go-qrcode" ) templ Qr(value string, href string) { if href != "" { { value } @CopyButton(value) } else { } } templ CopyButton(value string) {
} func qrEncode(value string) string { png, err := qrcode.Encode(value, qrcode.Medium, 256) if err != nil { return "" } return base64.StdEncoding.EncodeToString([]byte(png)) }