All checks were successful
Build Crate / build (push) Successful in 1m48s
25 lines
609 B
Rust
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()
|
|
}
|