fix layouts in child routes
This commit is contained in:
1 parent
128f3e4425
commit
5f37dcc2ac
2 files changed
+12
-2
No files matched your search
@@ -119,6 +119,8 @@ pub fn GenericRouter<R: Routable + Clone>(cx: Scope<GenericRouterProps<R>>) -> E
|
||||
where
|
||||
<R as FromStr>::Err: std::fmt::Display,
|
||||
{
|
||||
use crate::prelude::outlet::OutletContext;
|
||||
|
||||
use_context_provider(cx, || {
|
||||
GenericRouterContext::new(
|
||||
(cx.props
|
||||
@@ -129,6 +131,10 @@ where
|
||||
cx.schedule_update_any(),
|
||||
)
|
||||
});
|
||||
use_context_provider(cx, || OutletContext::<R> {
|
||||
current_level: 0,
|
||||
_marker: std::marker::PhantomData,
|
||||
});
|
||||
|
||||
render! {
|
||||
GenericOutlet::<R> {}
|
||||
@@ -152,6 +158,10 @@ where
|
||||
cx.schedule_update_any(),
|
||||
)
|
||||
});
|
||||
use_context_provider(cx, || OutletContext::<R> {
|
||||
current_level: 0,
|
||||
_marker: std::marker::PhantomData,
|
||||
});
|
||||
|
||||
render! {
|
||||
GenericOutlet::<R> {}
|
||||
|
||||
Reference in new issue
Block a user