Add initial forgot password form
Some checks failed
Build Crate / build (push) Failing after 1m43s

This commit is contained in:
2024-08-26 20:15:48 -04:00
parent e376874afa
commit 242f9b1218
5 changed files with 170 additions and 8 deletions

View File

@@ -5,7 +5,10 @@ use sycamore::prelude::*;
use web_sys::Event;
use crate::{
capsules::login_form::{LoginFormProps, LOGIN_FORM},
capsules::{
forgot_password_form::{ForgotPasswordFormProps, FORGOT_PASSWORD_FORM},
login_form::{LoginFormProps, LOGIN_FORM},
},
endpoints::LOGIN,
global_state::AppStateRx,
models::auth::LoginInfo,
@@ -105,6 +108,18 @@ pub fn Header<'a, G: Html>(cx: Scope<'a>, HeaderProps { game, title }: HeaderPro
view!{ cx, }
}
})
(match *global_state.modals_open.forgot_password.get() {
OpenState::Open => {
view! { cx,
(FORGOT_PASSWORD_FORM.widget(cx, "",
ForgotPasswordFormProps{}
))
}
}
OpenState::Closed => {
view!{ cx, }
}
})
}
}
}