Skip to content

Commit

Permalink
Fix issues after cherry-picking
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Jun 5, 2021
1 parent 6978e23 commit 15c59f0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
7 changes: 4 additions & 3 deletions examples/router/src/pages/post.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::{content, generator::Generated, Route};
use content::PostPart;
use std::borrow::Cow;
use yew::prelude::*;
use yew_router::prelude::*;

Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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">
Expand All @@ -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">{ &section.title }</h2>
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yew-router-macro"
version = "0.14.0"
version = "0.15.0"
authors = ["Hamza <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yew-router"
version = "0.14.0"
version = "0.15.0"
authors = ["Hamza <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router/tests/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> },
}
});
Expand Down
5 changes: 1 addition & 4 deletions packages/yew/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,14 @@ 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 }
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"
Expand Down

0 comments on commit 15c59f0

Please sign in to comment.