feat: added direct verification option in signup popup
This commit is contained in:
parent
815d5face5
commit
039cff2f2a
|
@ -108,6 +108,13 @@ pub fn SignUp(props: &Props) -> Html {
|
|||
cloned_state.set(data);
|
||||
});
|
||||
|
||||
let cloned_state = state.clone();
|
||||
let on_jump_to_verify = Callback::from(move |_| {
|
||||
let mut state = cloned_state.deref().clone();
|
||||
state.view = View::Verify;
|
||||
cloned_state.set(state);
|
||||
});
|
||||
|
||||
let cloned_state = state.clone();
|
||||
let on_sign_up_api_response = Callback::from(move |response: Result<()>| {
|
||||
let mut state = cloned_state.deref().clone();
|
||||
|
@ -195,6 +202,10 @@ pub fn SignUp(props: &Props) -> Html {
|
|||
<div class="center-x">
|
||||
<p class="auth-status">{&state.clone().deref().status}</p>
|
||||
</div>
|
||||
|
||||
<div class="center-x">
|
||||
<p>{"Or "}<a onclick={on_jump_to_verify} class="link" ><b>{"verify"}</b></a>{" a requested account."}</p>
|
||||
</div>
|
||||
</form>
|
||||
},
|
||||
View::Verify => html! {
|
||||
|
|
|
@ -12,4 +12,10 @@
|
|||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #690455;
|
||||
text-decoration: #690455 underline;
|
||||
cursor: pointer;
|
||||
}
|
Loading…
Reference in New Issue