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!{