Skip to content

Commit

Permalink
feat: search query edits are also a new page
Browse files Browse the repository at this point in the history
  • Loading branch information
akarras committed Oct 22, 2023
1 parent d0b0571 commit 014611a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ultros-frontend/ultros-app/src/components/ad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!{
<div class=ad_class>
<div class="flex flex-col h-full">
Expand Down

0 comments on commit 014611a

Please sign in to comment.