feat(web): add hashtags link in search

This commit is contained in:
əlemi 2024-08-11 15:13:44 +02:00
parent 253d757d9a
commit 86b0569cd2
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -9,6 +9,8 @@ use crate::prelude::*;
pub fn SearchPage() -> impl IntoView { pub fn SearchPage() -> impl IntoView {
let auth = use_context::<Auth>().expect("missing auth context"); let auth = use_context::<Auth>().expect("missing auth context");
let query = use_query_map().get().get("q").cloned().unwrap_or_default();
let user = create_local_resource( let user = create_local_resource(
move || use_query_map().get().get("q").cloned().unwrap_or_default(), move || use_query_map().get().get("q").cloned().unwrap_or_default(),
move |q| { move |q| {
@ -33,7 +35,10 @@ pub fn SearchPage() -> impl IntoView {
} }
); );
view! { view! {
<code class="center cw color"><a href={format!("/web/tags/{query}")}>#{query}</a></code>
<blockquote class="mt-3 mb-3"> <blockquote class="mt-3 mb-3">
<details open> <details open>
<summary class="mb-2"> <summary class="mb-2">