Clear up some r-a issues (and allow for `stable` in future)

This commit is contained in:
Greg Johnston 2022-11-17 20:30:32 -05:00
parent e26393a42c
commit 7ad8a6bef2
1 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ where
{ {
let location = use_location(cx); let location = use_location(cx);
let href = use_resolved_path(cx, move || props.href.to_href()()); let href = use_resolved_path(cx, move || props.href.to_href()());
let is_active = create_memo(cx, move |_| match href() { let is_active = create_memo(cx, move |_| match href.get() {
None => false, None => false,
Some(to) => { Some(to) => {
@ -104,10 +104,10 @@ where
if #[cfg(any(feature = "csr", feature = "hydrate"))] { if #[cfg(any(feature = "csr", feature = "hydrate"))] {
view! { cx, view! { cx,
<a <a
href=move || href().unwrap_or_default() href=move || href.get().unwrap_or_default()
prop:state={props.state.map(|s| s.to_js_value())} prop:state={props.state.map(|s| s.to_js_value())}
prop:replace={props.replace} prop:replace={props.replace}
aria-current=move || if is_active() { Some("page") } else { None } aria-current=move || if is_active.get() { Some("page") } else { None }
> >
{child} {child}
</a> </a>