diff --git a/web/src/page/register.rs b/web/src/page/register.rs index 04f5c2b..c6c8563 100644 --- a/web/src/page/register.rs +++ b/web/src/page/register.rs @@ -1,48 +1,77 @@ use leptos::*; +use reqwest::Method; use crate::prelude::*; #[component] pub fn RegisterPage() -> impl IntoView { + let auth = use_context::().expect("missing auth context"); + let username_ref: NodeRef = create_node_ref(); + let password_ref: NodeRef = create_node_ref(); + let display_name_ref: NodeRef = create_node_ref(); + let summary_ref: NodeRef = create_node_ref(); + let avatar_url_ref: NodeRef = create_node_ref(); + let banner_url_ref: NodeRef = create_node_ref(); + let (error, set_error) = create_signal(None); view! { -
+
register -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
username
password

display name
summary
avatar url
banner url

-
+
+
{}, + Err(e) => set_error.set(Some( + view! {
{e.to_string()}
} + )), + } + }); + } > +
username
+
+ +
+ +
password
+
+ +
+ +

+

+ +
display name
+
+ +
+ +
summary
+
+ +
+ +
avatar url
+
+ +
+ +
banner url
+
+ +
+ +

+

+ + +
+
+

{error}

} }