mirror of
https://github.com/divan/txqr.git
synced 2026-09-05 17:47:40 +08:00
Add ws address to start QR code
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
// StartQR renders the QR code with information needed to start
|
||||
// a new testing from smartphone.
|
||||
func (a *App) StartQR() vecty.ComponentOrHTML {
|
||||
img, err := qr.Encode("test", 500, qr.Medium)
|
||||
img, err := qr.Encode(a.wsAddress, 500, qr.Medium)
|
||||
if err != nil {
|
||||
// TODO(divan): display the error nicely (why this can even happen?)
|
||||
return elem.Div(vecty.Text(fmt.Sprintf("qr error: %v", err)))
|
||||
|
||||
Reference in New Issue
Block a user