Compare commits
2 commits
a0394ca94e
...
0efe1a3301
Author | SHA1 | Date | |
---|---|---|---|
0efe1a3301 | |||
c7139fa39e |
1 changed files with 6 additions and 8 deletions
|
@ -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::<Auth>().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 {
|
|||
</summary>
|
||||
<div class="pb-1">
|
||||
<ul>
|
||||
<li><a href={format!("/web/tags/{query}")}>#{query}</a></li>
|
||||
<li><a href={format!("/web/tags/{}", query.get())}>#{query}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</details>
|
||||
|
@ -101,11 +103,7 @@ pub fn SearchPage() -> impl IntoView {
|
|||
key=|id| id.clone()
|
||||
children=move |item| {
|
||||
cache::OBJECTS.get(&item)
|
||||
.map(|x| view! {
|
||||
<Item item=x />
|
||||
<hr />
|
||||
}.into_view()
|
||||
)
|
||||
.map(|x| view! { <Item item=x always=true /> }.into_view())
|
||||
}
|
||||
/ >
|
||||
}.into_view())
|
||||
|
|
Loading…
Reference in a new issue