2024-07-18 04:00:56 -04:00
|
|
|
use crate::components::counter_btn::Button;
|
|
|
|
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">
|
|
|
|
|
|
|
|
<h1>"Cards For Humanity"</h1>
|
|
|
|
<hr/>
|
2024-07-18 19:53:28 -04:00
|
|
|
<p>Hello, [Name]</p>
|
|
|
|
<hr/>
|
|
|
|
<p>Connection status: Disconnected.</p>
|
2024-07-18 04:00:56 -04:00
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
<Button/>
|
|
|
|
<Button increment=5/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</ErrorBoundary>
|
|
|
|
}
|
|
|
|
}
|