package component import ( "fmt" common "forge.cadoles.com/wpetit/kouiz/internal/http/handler/webui/common/component" "forge.cadoles.com/wpetit/kouiz/internal/store" "strconv" ) type ResultPageVModel struct { Player *store.Player PlayerRank int Entry *store.QuizEntry Won bool } templ ResultPage(vmodel ResultPageVModel) { @common.AppPage(common.WithPageOptions( common.WithTitle("Quiz"), )) {
La réponse attendue à la question
"{ vmodel.Entry.Question }" était "{ vmodel.Entry.Answer }".
Vous avez gagné { strconv.FormatInt(int64((vmodel.Entry.Level+1)*2), 10) } points !
}Vous avez actuellement { strconv.FormatInt(int64((vmodel.Player.Score)), 10) } points, ce qui vous place en position #{ strconv.FormatInt(int64(vmodel.PlayerRank), 10) } du classement.