Skip to content

Commit

Permalink
fix: do not use leptos_use\'s ssr feature, do not run use_geolocation…
Browse files Browse the repository at this point in the history
… in interval
  • Loading branch information
jflessau committed Jan 12, 2024
1 parent 822e163 commit 380da62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ leptos_meta = { version = "0.5.4", features = ["nightly"], optional = true }
leptos_router = { version = "0.5.4", features = ["nightly"], optional = true }
leptos_axum = { version = "0.5.4", optional = true }
leptos_server_signal = { version = "0.5.2" }
leptos-use = { version = "0.9.0", features = ["ssr"] }
leptos-use = { version = "0.9.0" }
names = "0.14.0"
uuid = { version = "1.6.1", features = ["serde", "v4"] }
chrono = { version = "0.4.31", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ fn LocateUser() -> impl IntoView {
if let Some(prev_handle) = prev_handle {
prev_handle.clear();
};
let UseGeolocationReturn { coords, error, .. } = use_geolocation();

log::info!("run effect");

Expand All @@ -46,7 +47,6 @@ fn LocateUser() -> impl IntoView {
log::info!("window is some: {:?}", window.is_some()); // logs "window is some: false" to browser console

log::info!("run locate");
let UseGeolocationReturn { coords, error, .. } = use_geolocation();
if let Some(coords) = coords.get() {
log::info!(
"lat: {:?}, long: {:?}",
Expand Down

0 comments on commit 380da62

Please sign in to comment.