This commit is contained in:
24
src/templates/pool/index.rs
Normal file
24
src/templates/pool/index.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user