From f0cd0fb41dd4b90dfb6270a8b2d05785c9eadda2 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Fri, 11 Oct 2024 14:06:11 -0400 Subject: [PATCH] feat: condense Router/Routes `base` prop into one (#3100) --- router/src/components.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/router/src/components.rs b/router/src/components.rs index 48a1aea40d..3a2a96666f 100644 --- a/router/src/components.rs +++ b/router/src/components.rs @@ -248,7 +248,10 @@ where base.upgrade_inplace(); base }); - let routes = Routes::new(children.into_inner()); + let routes = Routes::new_with_base( + children.into_inner(), + base.clone().unwrap_or_default(), + ); let outer_owner = Owner::current().expect("creating Routes, but no Owner was found"); move || { @@ -294,7 +297,10 @@ where base.upgrade_inplace(); base }); - let routes = Routes::new(children.into_inner()); + let routes = Routes::new_with_base( + children.into_inner(), + base.clone().unwrap_or_default(), + ); let outer_owner = Owner::current().expect("creating Router, but no Owner was found");