Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SorenHolstHansen committed Feb 6, 2024
1 parent 6eb56d0 commit c42b62c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 1 addition & 4 deletions examples/basic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ fn Page() -> impl IntoView {
/>
},
Some(toast_id),
Some(ToastOptions {
duration: Some(std::time::Duration::from_secs(100)),
..Default::default()
}),
None,
);
};

Expand Down
8 changes: 2 additions & 6 deletions src/toast_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ use crate::{
ToastId, ToasterPosition,
};
use js_sys::Date;
use leptos::{
leptos_dom::{helpers::TimeoutHandle, logging::console_log},
*,
};
use leptos::{leptos_dom::helpers::TimeoutHandle, *};
use std::cmp::{max, min};
use std::time::Duration;
use wasm_bindgen::JsCast;
Expand Down Expand Up @@ -95,7 +92,7 @@ pub fn ToastContainer(
}
remove_toast(toast.id);
},
std::time::Duration::from_millis(200),
Duration::from_millis(200),
);
};

Expand Down Expand Up @@ -137,7 +134,6 @@ pub fn ToastContainer(

if let Some(target) = ev.target() {
if let Some(element) = target.dyn_ref::<HtmlElement>() {
console_log("IN HERE");
let _ = element.set_pointer_capture(ev.pointer_id());
if element.tag_name() == "BUTTON" {
return;
Expand Down

0 comments on commit c42b62c

Please sign in to comment.