change name to shell

This commit is contained in:
Greg Johnston 2024-06-14 12:53:13 -04:00
parent bccc05fec8
commit 0a559935e7
3 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ use leptos_router::{
use serde::{Deserialize, Serialize};
use thiserror::Error;
pub fn server_app(leptos_options: &LeptosOptions) -> impl IntoView {
pub fn shell(leptos_options: &LeptosOptions) -> impl IntoView {
view! {
<!DOCTYPE html>
<html lang="en">

View File

@ -1,4 +1,4 @@
use crate::app::server_app;
use crate::app::shell;
use axum::{
body::Body,
extract::State,
@ -21,7 +21,7 @@ pub async fn file_and_error_handler(
res.into_response()
} else {
let handler =
leptos_axum::render_app_to_stream(move || server_app(&options));
leptos_axum::render_app_to_stream(move || shell(&options));
handler(req).await.into_response()
}
}

View File

@ -15,7 +15,7 @@ async fn main() {
let app = Router::new()
.leptos_routes(&leptos_options, routes, {
let leptos_options = leptos_options.clone();
move || server_app(&leptos_options)
move || shell(&leptos_options)
})
.fallback(file_and_error_handler)
.with_state(leptos_options);