fix the default server fullstack history
This commit is contained in:
1 parent
2034591ab3
commit
8f68585c1f
1 file changed
+2
-2
@@ -54,7 +54,7 @@ macro_rules! default_history {
|
|||||||
return Box::new(AnyHistoryProviderImplWrapper::new(WebHistory::<R>::default()));
|
return Box::new(AnyHistoryProviderImplWrapper::new(WebHistory::<R>::default()));
|
||||||
// If we are using dioxus fullstack and the ssr feature is enabled, use the memory history with the initial path set to the current path in fullstack
|
// If we are using dioxus fullstack and the ssr feature is enabled, use the memory history with the initial path set to the current path in fullstack
|
||||||
#[cfg(all(feature = "fullstack", feature = "ssr"))]
|
#[cfg(all(feature = "fullstack", feature = "ssr"))]
|
||||||
return MemoryHistory::with_initial_path(
|
return Box::new(AnyHistoryProviderImplWrapper::new(MemoryHistory::<R>::with_initial_path(
|
||||||
dioxus_fullstack::prelude::server_context()
|
dioxus_fullstack::prelude::server_context()
|
||||||
.request_parts()
|
.request_parts()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
@@ -69,7 +69,7 @@ macro_rules! default_history {
|
|||||||
panic!("Failed to parse uri: {}", err);
|
panic!("Failed to parse uri: {}", err);
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
);
|
)));
|
||||||
// If we are not on wasm32 and the liveview feature is enabled, use the liveview history.
|
// If we are not on wasm32 and the liveview feature is enabled, use the liveview history.
|
||||||
#[cfg(all(feature = "liveview"))]
|
#[cfg(all(feature = "liveview"))]
|
||||||
return Box::new(AnyHistoryProviderImplWrapper::new(LiveviewHistory::new_with_initial_path($initial_route)));
|
return Box::new(AnyHistoryProviderImplWrapper::new(LiveviewHistory::new_with_initial_path($initial_route)));
|
||||||
|
|||||||
Reference in new issue
Block a user