change name to shell
This commit is contained in:
parent
bccc05fec8
commit
0a559935e7
|
@ -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">
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue