diff --git a/router/src/components/route.rs b/router/src/components/route.rs index aeb1ce9306..2be29a8f61 100644 --- a/router/src/components/route.rs +++ b/router/src/components/route.rs @@ -162,9 +162,9 @@ pub fn StaticRoute( /// that returns a type that implements [IntoView] (like `|| view! {

"Show this"

})` /// or `|| view! { ` } or even, for a component with no props, `MyComponent`). view: F, - /// The data required to fill any dynamic segments in the path during static rendering. + /// Creates a map of the params that should be built for a particular route. #[prop(optional)] - static_data: Option, + static_params: Option, /// The static route mode #[prop(optional)] mode: StaticMode, @@ -193,7 +193,7 @@ where &[Method::Get], data, Some(mode), - static_data.map(|s| Rc::new(s) as _), + static_params.map(|s| Rc::new(s) as _), ) } @@ -210,7 +210,7 @@ pub(crate) fn define_route( methods: &'static [Method], data: Option, static_mode: Option, - static_data: Option, + static_params: Option, ) -> RouteDefinition { let children = children .map(|children| { @@ -242,7 +242,7 @@ pub(crate) fn define_route( methods, data, static_mode, - static_data, + static_params, } } diff --git a/router/src/extract_routes.rs b/router/src/extract_routes.rs index 6202a685bd..54170d695e 100644 --- a/router/src/extract_routes.rs +++ b/router/src/extract_routes.rs @@ -146,7 +146,7 @@ where for route in branch.routes.iter() { static_data_map.insert( route.pattern.to_string(), - route.key.static_data.clone(), + route.key.static_params.clone(), ); } route.map(|(static_mode, path)| RouteListing { diff --git a/router/src/matching/route.rs b/router/src/matching/route.rs index 106acc4eb6..fe178a72fc 100644 --- a/router/src/matching/route.rs +++ b/router/src/matching/route.rs @@ -24,7 +24,7 @@ pub struct RouteDefinition { /// The route's preferred mode of static generation, if any pub static_mode: Option, /// The data required to fill any dynamic segments in the path during static rendering. - pub static_data: Option, + pub static_params: Option, } impl std::fmt::Debug for RouteDefinition {