Skip to content

Commit

Permalink
create login file
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfl0wer committed Dec 14, 2023
1 parent 7fa46e9 commit 2e4f5fb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions crates/polyphony-wasm/src/app/login.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use leptos::*;

#[component]
pub fn Login() -> impl IntoView {
todo!()
}
2 changes: 2 additions & 0 deletions crates/polyphony-wasm/src/app/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pub mod login;
pub mod register;

pub use login::*;
pub use register::*;
1 change: 1 addition & 0 deletions crates/polyphony-wasm/src/app/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub fn Register() -> impl IntoView {
async move { register(&input).await }
});
debug!("Rendering Register component");
// TODO: Set an error if registering fails
view! {
<form on:submit=move |ev| {
ev.prevent_default();
Expand Down
6 changes: 2 additions & 4 deletions crates/polyphony-wasm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use leptos::*;
use leptos_router::*;
use log::*;

use crate::app::Register;
use crate::app::{Login, Register};
use crate::stores::ChorusStore;

#[component]
Expand All @@ -23,9 +23,7 @@ fn App() -> impl IntoView {
<Routes>
<Route path="/" view=|| view! { "welcome" }/>
<Route path="/register" view=Register/>
<Route path="/u" view=|| view! { "hi" }>
<Route path=":id" view=|| view! {"meow"}/>
</Route>
<Route path="/login" view=Login/>
</Routes>
</main>
</Router>
Expand Down

0 comments on commit 2e4f5fb

Please sign in to comment.