break out auth

This commit is contained in:
Adam 2024-07-23 22:48:39 -04:00
parent b88ecb29c0
commit bba515cd1d
4 changed files with 20 additions and 17 deletions

View file

@ -0,0 +1,17 @@
use leptos::*;
#[component]
pub fn Auth() -> impl IntoView {
let (username, _set_username) = create_signal("Anonymous");
view! {
<div class="p-1">
<h2 class="text-2xl">Sign in:</h2>
<p>Username:</p>
<input
class="w-96 font-mono rounded-sm bg-slate-900 text-slate-200"
placeholder=move || username.get()
/>
</div>
}
}

View file

@ -1,2 +1,3 @@
pub mod auth;
pub mod chat;
pub mod websocket;

View file

@ -128,19 +128,3 @@ pub fn Websocket() -> impl IntoView {
</div>
}
}
#[component]
pub fn Auth() -> impl IntoView {
let (username, _set_username) = create_signal("Anonymous");
view! {
<div class="p-1">
<h2 class="text-2xl">Sign in:</h2>
<p>Username:</p>
<input
class="w-96 font-mono rounded-sm bg-slate-900 text-slate-200"
placeholder=move || username.get()
/>
</div>
}
}

View file

@ -1,5 +1,6 @@
use crate::components::websocket::*;
use crate::components::auth::*;
use crate::components::chat::*;
use crate::components::websocket::*;
use leptos::*;
/// Default Home Page