cards/client/src/pages/home.rs
2024-08-07 22:48:19 -04:00

49 lines
1.4 KiB
Rust

use crate::components::auth::*;
use crate::components::browser::*;
use crate::components::chat::*;
use crate::components::debug::*;
use crate::components::websocket::*;
use leptos::*;
/// Default Home Page
#[component]
pub fn Home() -> impl IntoView {
view! {
<ErrorBoundary fallback=|errors| {
view! {
<h1>"Uh oh! Something went wrong!"</h1>
<p>"Errors: "</p>
// Render a list of errors as strings - good for development purposes
<ul>
{move || {
errors
.get()
.into_iter()
.map(|(_, e)| view! { <li>{e.to_string()}</li> })
.collect_view()
}}
</ul>
}
}>
<div class="container m-auto">
<h1 class="inter-med text-6xl text-neutral-200">"Cards For Humanity"</h1>
<div class="bg-neutral-950">
<Websocket/>
<hr/>
<Auth/>
<hr/>
<Browser/>
<hr/>
<Chat/>
<hr/>
<Debug/>
<hr/>
<a href="https://git.doordesk.net/adam/cards/">git</a>
</div>
</div>
</ErrorBoundary>
}
}