From c7139fa39ead29879e4c792640fc0656582dcd81 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 11 Aug 2024 15:28:52 +0200 Subject: [PATCH] fix(web): signal::derive to update tags list --- web/src/page/search.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/page/search.rs b/web/src/page/search.rs index bec447d..27ad62a 100644 --- a/web/src/page/search.rs +++ b/web/src/page/search.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use apb::{Base, Collection}; +use apb::Collection; use leptos::*; use leptos_router::*; use crate::prelude::*; @@ -9,7 +9,9 @@ use crate::prelude::*; pub fn SearchPage() -> impl IntoView { let auth = use_context::().expect("missing auth context"); - let query = use_query_map().get().get("q").cloned().unwrap_or_default(); + let query = Signal::derive(|| + use_query_map().with(|x| x.get("q").cloned().unwrap_or_default()) + ); let user = create_local_resource( move || use_query_map().get().get("q").cloned().unwrap_or_default(), @@ -78,7 +80,7 @@ pub fn SearchPage() -> impl IntoView {