Files
elo/src/templates/index.rs
Matthew Kaminski ed780c9585
All checks were successful
Build Crate / build (push) Successful in 1m48s
Fix more clippy issues, implement forgot password
2024-08-28 23:03:52 -04:00

25 lines
609 B
Rust

use crate::{components::layout::Layout, state_enums::GameState};
use perseus::prelude::*;
use sycamore::prelude::*;
fn index_page<G: Html>(cx: Scope) -> View<G> {
view! { cx,
Layout(game = GameState::Pool) {
// Anything we put in here will be rendered inside the `<main>` block of the layout
p { "Hello World!" }
br {}
}
}
}
#[engine_only_fn]
fn head(cx: Scope) -> View<SsrNode> {
view! { cx,
title { "Index Page" }
}
}
pub fn get_template<G: Html>() -> Template<G> {
Template::build("").view(index_page).head(head).build()
}