mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Fix issues after cherry-picking
This commit is contained in:
parent
e1f093858b
commit
8fc81b47ee
@ -1,5 +1,6 @@
|
||||
use crate::{content, generator::Generated, Route};
|
||||
use content::PostPart;
|
||||
use std::borrow::Cow;
|
||||
use yew::prelude::*;
|
||||
use yew_router::prelude::*;
|
||||
|
||||
@ -46,7 +47,7 @@ impl Component for Post {
|
||||
html! {
|
||||
<>
|
||||
<section class="hero is-medium is-light has-background">
|
||||
<img class="hero-background is-transparent" src=post.meta.image_url />
|
||||
<img class="hero-background is-transparent" src=Cow::Owned(post.meta.image_url.clone()) />
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<h1 class="title">
|
||||
@ -77,7 +78,7 @@ impl Post {
|
||||
<article class="media block box my-6">
|
||||
<figure class="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img src=quote.author.image_url loading="lazy" />
|
||||
<img src=Cow::Owned(quote.author.image_url.clone()) loading="lazy" />
|
||||
</p>
|
||||
</figure>
|
||||
<div class="media-content">
|
||||
@ -97,7 +98,7 @@ impl Post {
|
||||
fn render_section_hero(&self, section: &content::Section) -> Html {
|
||||
html! {
|
||||
<section class="hero is-dark has-background mt-6 mb-3">
|
||||
<img class="hero-background is-transparent" src=section.image_url loading="lazy" />
|
||||
<img class="hero-background is-transparent" src=Cow::Owned(section.image_url.clone()) loading="lazy" />
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<h2 class="subtitle">{ §ion.title }</h2>
|
||||
|
||||
@ -34,9 +34,9 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
|
||||
15 | <>{ for (0..3).map(|_| not_tree()) }</>
|
||||
| ^^^^^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
::: $WORKSPACE/packages/yew/src/utils.rs:76:8
|
||||
::: $WORKSPACE/packages/yew/src/utils.rs
|
||||
|
|
||||
76 | T: Into<R>,
|
||||
| T: Into<R>,
|
||||
| ------- required by this bound in `into_node_iter`
|
||||
|
|
||||
= help: the trait `std::fmt::Display` is not implemented for `()`
|
||||
|
||||
@ -70,9 +70,9 @@ error[E0277]: `()` is not an iterator
|
||||
18 | { for () }
|
||||
| ^^ `()` is not an iterator
|
||||
|
|
||||
::: $WORKSPACE/packages/yew/src/utils.rs:75:9
|
||||
::: $WORKSPACE/packages/yew/src/utils.rs
|
||||
|
|
||||
75 | IT: IntoIterator<Item = T>,
|
||||
| IT: IntoIterator<Item = T>,
|
||||
| ---------------------- required by this bound in `into_node_iter`
|
||||
|
|
||||
= help: the trait `Iterator` is not implemented for `()`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "yew-router-macro"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
authors = ["Hamza <muhammadhamza1311@gmail.com>"]
|
||||
edition = "2018"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "yew-router"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
authors = ["Hamza <muhammadhamza1311@gmail.com>"]
|
||||
edition = "2018"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
@ -61,7 +61,7 @@ fn component() -> Html {
|
||||
<a onclick=onclick>{"click me"}</a>
|
||||
</>
|
||||
},
|
||||
Routes::No { id } => html! { <No id=id /> },
|
||||
Routes::No { id } => html! { <No id=*id /> },
|
||||
Routes::NotFound => html! { <div id="result">{"404"}</div> },
|
||||
}
|
||||
});
|
||||
|
||||
@ -30,7 +30,7 @@ slab = "0.4"
|
||||
thiserror = "1"
|
||||
wasm-bindgen = "0.2.74"
|
||||
wasm-bindgen-futures = "0.4"
|
||||
yew-macro = { version = "0.17.0", path = "../yew-macro" }
|
||||
yew-macro = { version = "^0.18.0", path = "../yew-macro" }
|
||||
|
||||
# optional encodings
|
||||
bincode = { version = "1", optional = true }
|
||||
@ -38,9 +38,6 @@ rmp-serde = { version = "0.15.0", optional = true }
|
||||
serde_cbor = { version = "0.11.1", optional = true }
|
||||
serde_yaml = { version = "0.8.4", optional = true }
|
||||
toml = { version = "0.5", optional = true }
|
||||
wasm-bindgen = { version = "0.2.60", optional = true }
|
||||
wasm-bindgen-futures = { version = "0.4", optional = true }
|
||||
yew-macro = { version = "^0.18.0", path = "../yew-macro" }
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user