"Loading..."
} set_pending > {move || match stories.get() { None => None, - Some(None) => Some(view! {"Error loading stories."
}.into_any()), + Some(None) => Some(view! {"Error loading stories."
}.into_any()), Some(Some(stories)) => { Some(view! {-
@@ -123,7 +120,7 @@ fn Story(story: api::Story) -> impl IntoView {
}.into_view()
} else {
let title = story.title.clone();
- view! { {title.clone()} }.into_view()
+ view! { {title.clone()} }.into_view()
}}
@@ -132,7 +129,7 @@ fn Story(story: api::Story) -> impl IntoView { view! { {"by "} - {story.user.map(|user| view ! { {user.clone()}})} + {story.user.map(|user| view ! { {user.clone()}})} {format!(" {} | ", story.time_ago)} {if story.comments_count.unwrap_or_default() > 0 { @@ -145,7 +142,7 @@ fn Story(story: api::Story) -> impl IntoView { }.into_view() } else { let title = story.title.clone(); - view! { {title.clone()} }.into_view() + view! { {title.clone()} }.into_view() }} {(story.story_type != "link").then(|| view! { diff --git a/examples/hackernews_axum/src/routes/stories.rs b/examples/hackernews_axum/src/routes/stories.rs index 150ce21921..a8ab981c2f 100644 --- a/examples/hackernews_axum/src/routes/stories.rs +++ b/examples/hackernews_axum/src/routes/stories.rs @@ -70,7 +70,7 @@ pub fn Stories() -> impl IntoView { > = + > "more >"