feat: update template

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2025-01-11 22:22:39 +01:00
parent 5cf5519524
commit c01c27a0a4
20 changed files with 247 additions and 2808 deletions

View File

@@ -0,0 +1,14 @@
use axum::extract::FromRef;
use leptos::prelude::expect_context;
use server_fn::ServerFnError;
#[derive(FromRef, Clone)]
pub struct State {}
pub async fn get_state() -> Result<State, ServerFnError> {
let state = expect_context::<crate::state::State>();
let axum::extract::State(state): axum::extract::State<crate::state::State> =
leptos_axum::extract_with_state(&state).await?;
Ok(state)
}