Files
elo/src/templates/pool/index.rs
Matthew Kaminski d25fb283cc
Some checks failed
Build Crate / build (push) Failing after 1m46s
Mode templates to folders
2024-08-29 16:28:05 -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()
}