Skip to content

Commit 4446ed9

Browse files
committed
fix errors
1 parent 595d8b6 commit 4446ed9

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/website-test/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ yew-agent = { path = "../../packages/yew-agent/" }
1212
boolinator = "2.4"
1313
derive_more = "0.99"
1414
gloo-events = "0.1"
15+
gloo-utils = "0.1"
1516
js-sys = "0.3"
1617
wasm-bindgen = "0.2"
1718
wasm-bindgen-futures = "0.4"

packages/yew-router/src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ pub fn fetch_base_url() -> Option<String> {
4343

4444
#[cfg(test)]
4545
mod tests {
46+
use gloo_utils::document;
4647
use serde::Serialize;
4748
use std::collections::HashMap;
4849
use wasm_bindgen_test::wasm_bindgen_test as test;
49-
use yew::utils::*;
5050
use yew_router::parse_query;
5151
use yew_router::prelude::*;
5252
use yew_router::utils::*;

website/docs/concepts/function-components/pre-defined-hooks.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn ref_hook() -> Html {
6262
let message_count = use_ref(|| 0);
6363

6464
let onclick = Callback::from(move |_| {
65-
let window = yew::utils::window();
65+
let window = gloo_utils::window();
6666

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

218218
// Perform the cleanup
219-
|| yew::utils::document().set_title("You clicked 0 times")
219+
|| gloo_utils::document().set_title("You clicked 0 times")
220220
});
221221
}
222222
let onclick = {

website/docs/concepts/html/elements.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ used as a `Html` value using `VRef`:
1313

1414
```rust
1515
use web_sys::{Element, Node};
16-
use yew::{
17-
Component, Context, html, Html, utils::document,
18-
};
16+
use yew::{Component, Context, html, Html};
17+
use gloo_utils::document;
1918

2019
struct Comp;
2120

0 commit comments

Comments
 (0)