diff --git a/web/src/page/object.rs b/web/src/page/object.rs index bb143f6a..8a362a9b 100644 --- a/web/src/page/object.rs +++ b/web/src/page/object.rs @@ -10,8 +10,6 @@ use apb::{Base, Object}; pub fn ObjectPage(tl: Timeline) -> impl IntoView { let params = use_params_map(); let auth = use_context::().expect("missing auth context"); - let id = params.get().get("id").cloned().unwrap_or_default(); - let uid = uriproxy::uri(URL_BASE, uriproxy::UriClass::Object, &id); let object = create_local_resource( move || params.get().get("id").cloned().unwrap_or_default(), move |oid| async move { @@ -38,7 +36,7 @@ pub fn ObjectPage(tl: Timeline) -> impl IntoView { }; if let Ok(ctx) = obj.context().id() { let tl_url = format!("{}/context/page", Uri::api(U::Object, ctx, false)); - if !tl.next.get().starts_with(&tl_url) { + if !tl.next.get_untracked().starts_with(&tl_url) { tl.reset(tl_url); } } @@ -64,7 +62,8 @@ pub fn ObjectPage(tl: Timeline) -> impl IntoView { {move || match object.get() { None => view! {

loading ...

}.into_view(), Some(None) => { - let uid = uid.clone(); + let raw_id = params.get().get("id").cloned().unwrap_or_default(); + let uid = uriproxy::uri(URL_BASE, uriproxy::UriClass::Object, &raw_id); view! {

loading failed"↗"

}.into_view() }, Some(Some(o)) => { diff --git a/web/src/page/user.rs b/web/src/page/user.rs index 68bcb9a4..32316abd 100644 --- a/web/src/page/user.rs +++ b/web/src/page/user.rs @@ -33,7 +33,7 @@ pub fn UserPage(tl: Timeline) -> impl IntoView { move |id| { async move { let tl_url = format!("{}/outbox/page", Uri::api(U::Actor, &id, false)); - if !tl.next.get().starts_with(&tl_url) { + if !tl.next.get_untracked().starts_with(&tl_url) { tl.reset(tl_url); } match CACHE.get(&Uri::full(U::Actor, &id)) {