Fix context type in static generation crate (#2607)
This commit is contained in:
1 parent
c47d7da070
commit
f07ab370b9
2 files changed
+2
-3
No files matched your search
@@ -116,8 +116,6 @@ async fn launch_server(
|
|||||||
) {
|
) {
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
||||||
use crate::prelude::RenderHandleState;
|
|
||||||
|
|
||||||
let args = dioxus_cli_config::ServeArguments::from_cli()
|
let args = dioxus_cli_config::ServeArguments::from_cli()
|
||||||
.unwrap_or_else(dioxus_cli_config::ServeArguments::parse);
|
.unwrap_or_else(dioxus_cli_config::ServeArguments::parse);
|
||||||
let addr = args
|
let addr = args
|
||||||
@@ -129,6 +127,7 @@ async fn launch_server(
|
|||||||
#[cfg(feature = "axum")]
|
#[cfg(feature = "axum")]
|
||||||
{
|
{
|
||||||
use crate::axum_adapter::DioxusRouterExt;
|
use crate::axum_adapter::DioxusRouterExt;
|
||||||
|
use crate::prelude::RenderHandleState;
|
||||||
|
|
||||||
let router = axum::Router::new().register_server_functions_with_context(context_providers);
|
let router = axum::Router::new().register_server_functions_with_context(context_providers);
|
||||||
#[cfg(not(any(feature = "desktop", feature = "mobile")))]
|
#[cfg(not(any(feature = "desktop", feature = "mobile")))]
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ pub use crate::Config;
|
|||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub fn launch(
|
pub fn launch(
|
||||||
root: fn() -> Element,
|
root: fn() -> Element,
|
||||||
contexts: Vec<Box<dyn Fn() -> Box<dyn Any> + Send + Sync>>,
|
contexts: Vec<Box<dyn Fn() -> Box<dyn Any + Send + Sync> + Send + Sync>>,
|
||||||
platform_config: Config,
|
platform_config: Config,
|
||||||
) {
|
) {
|
||||||
let virtual_dom_factory = move || {
|
let virtual_dom_factory = move || {
|
||||||
|
|||||||
Reference in new issue
Block a user