mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
docs: comments for the event handling in login
This commit is contained in:
parent
8942eb59a5
commit
6e0e00c7f3
@ -31,7 +31,8 @@ pub fn LoginForm<'ctx, G: Html>(cx: Scope<'ctx>, sh: StateHandler<'ctx>) -> View
|
|||||||
info!("Attempting login request");
|
info!("Attempting login request");
|
||||||
let (username, password) = ((*username.get_untracked()).clone(), (*password.get_untracked()).clone());
|
let (username, password) = ((*username.get_untracked()).clone(), (*password.get_untracked()).clone());
|
||||||
// NOTE(jwall): This is required if we want to keep the below auth request from
|
// NOTE(jwall): This is required if we want to keep the below auth request from
|
||||||
// failing to send with blocked by browser.
|
// failing to send with blocked by browser. This is because it's on a click and
|
||||||
|
// the form tries to do a submit event and aborts our network request.
|
||||||
evt.prevent_default();
|
evt.prevent_default();
|
||||||
if username != "" && password != "" {
|
if username != "" && password != "" {
|
||||||
spawn_local_scoped(cx, async move {
|
spawn_local_scoped(cx, async move {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user