Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Oct 29, 2021
1 parent 595d8b6 commit 4446ed9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/website-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ yew-agent = { path = "../../packages/yew-agent/" }
boolinator = "2.4"
derive_more = "0.99"
gloo-events = "0.1"
gloo-utils = "0.1"
js-sys = "0.3"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ pub fn fetch_base_url() -> Option<String> {

#[cfg(test)]
mod tests {
use gloo_utils::document;
use serde::Serialize;
use std::collections::HashMap;
use wasm_bindgen_test::wasm_bindgen_test as test;
use yew::utils::*;
use yew_router::parse_query;
use yew_router::prelude::*;
use yew_router::utils::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn ref_hook() -> Html {
let message_count = use_ref(|| 0);

let onclick = Callback::from(move |_| {
let window = yew::utils::window();
let window = gloo_utils::window();

if *message_count.borrow_mut() > 3 {
window.alert_with_message("Message limit reached").unwrap();
Expand Down Expand Up @@ -213,10 +213,10 @@ fn effect() -> Html {
let counter = counter.clone();
use_effect(move || {
// Make a call to DOM API after component is rendered
yew::utils::document().set_title(&format!("You clicked {} times", *counter));
gloo_utils::document().set_title(&format!("You clicked {} times", *counter));

// Perform the cleanup
|| yew::utils::document().set_title("You clicked 0 times")
|| gloo_utils::document().set_title("You clicked 0 times")
});
}
let onclick = {
Expand Down
5 changes: 2 additions & 3 deletions website/docs/concepts/html/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ used as a `Html` value using `VRef`:

```rust
use web_sys::{Element, Node};
use yew::{
Component, Context, html, Html, utils::document,
};
use yew::{Component, Context, html, Html};
use gloo_utils::document;

struct Comp;

Expand Down

0 comments on commit 4446ed9

Please sign in to comment.