From 82fc9739bbede04525ff71346b1228c859ce7afb Mon Sep 17 00:00:00 2001 From: Maccesch Date: Wed, 9 Mar 2022 03:25:40 +0000 Subject: [PATCH] updated to new way of checking path of route --- packages/router/src/components/link.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/router/src/components/link.rs b/packages/router/src/components/link.rs index 40248335c..6ccca6c7d 100644 --- a/packages/router/src/components/link.rs +++ b/packages/router/src/components/link.rs @@ -98,8 +98,8 @@ pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element { let prevent_default = if outerlink { "" } else { "onclick" }; let route = use_route(&cx); - let location = route.current_location(); - let path = location.path(); + let url = route.url(); + let path = url.path(); let active = path == cx.props.to; let active_class = active.then(|| { active_class.unwrap_or("active")