From 014611a975875e9617b6b0aad6dd4242e2e903c7 Mon Sep 17 00:00:00 2001 From: akarras Date: Sun, 22 Oct 2023 09:37:51 -0600 Subject: [PATCH] feat: search query edits are also a new page --- ultros-frontend/ultros-app/src/components/ad.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ultros-frontend/ultros-app/src/components/ad.rs b/ultros-frontend/ultros-app/src/components/ad.rs index 95a749e8..5835315e 100644 --- a/ultros-frontend/ultros-app/src/components/ad.rs +++ b/ultros-frontend/ultros-app/src/components/ad.rs @@ -9,8 +9,10 @@ pub fn Ad(#[prop(optional)] class: Option<&'static str>) -> impl IntoView { let (hide_ads, _) = cookies.use_cookie_typed::<_, bool>("HIDE_ADS"); let location = use_location(); let pathname = location.pathname; + let search = location.search; move || { let _ = pathname(); // reading from the path to reload this component on page load + let _ = search(); (!hide_ads().unwrap_or_default()).then(move ||view!{