diff --git a/Cargo.toml b/Cargo.toml index 1b08bc8..47ed5e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,6 @@ thaw_components = { version = "0.2.0-alpha", path = "./thaw_components" } thaw_macro = { version = "0.1.0-alpha", path = "./thaw_macro" } thaw_utils = { version = "0.1.0-alpha", path = "./thaw_utils" } -leptos = { git = "https://github.com/leptos-rs/leptos", rev = "20af4928b2fffe017408d3f4e7330db22cf68277" } -leptos_meta = { git = "https://github.com/leptos-rs/leptos", rev = "20af4928b2fffe017408d3f4e7330db22cf68277" } -leptos_router = { git = "https://github.com/leptos-rs/leptos", rev = "20af4928b2fffe017408d3f4e7330db22cf68277" } +leptos = { version = "0.7.0-beta2" } +leptos_meta = { version = "0.7.0-beta2" } +leptos_router = { version = "0.7.0-beta2" } diff --git a/demo/src/app.rs b/demo/src/app.rs index 00101d5..1e4a320 100644 --- a/demo/src/app.rs +++ b/demo/src/app.rs @@ -74,7 +74,7 @@ fn TheRouter() -> impl IntoView { - + diff --git a/demo/src/components/switch_version.rs b/demo/src/components/switch_version.rs index 439c1c7..5781cd3 100644 --- a/demo/src/components/switch_version.rs +++ b/demo/src/components/switch_version.rs @@ -13,25 +13,23 @@ pub fn SwitchVersion() -> impl IntoView { ("0.2.5", "https://thaw-8og1kv8zs-thaw.vercel.app"), ]; - cfg_if::cfg_if! { - if #[cfg(any(feature = "csr", feature = "hydrate"))] { - let location = window().location(); - let origin = location.origin().ok(); - let version = RwSignal::new(origin); - let _ = version.watch(move |origin| { - if let Some(origin) = origin { - let pathname = location.pathname().unwrap_or_default(); - let href = format!("{}{}", origin, pathname); - let _ = location.set_href(&href); - } - }); - } else { - // let version = RwSignal::new(None::); - } + let version = RwSignal::new(None::); + #[cfg(any(feature = "csr", feature = "hydrate"))] + { + let location = window().location(); + let origin = location.origin().ok(); + version.set(origin); + let _ = version.watch(move |origin| { + if let Some(origin) = origin { + let pathname = location.pathname().unwrap_or_default(); + let href = format!("{}{}", origin, pathname); + let _ = location.set_href(&href); + } + }); } view! { - + { options.into_iter().map(|option| view! { diff --git a/examples/ssr_axum/Cargo.toml b/examples/ssr_axum/Cargo.toml index 02265e5..9df2eee 100644 --- a/examples/ssr_axum/Cargo.toml +++ b/examples/ssr_axum/Cargo.toml @@ -9,10 +9,10 @@ crate-type = ["cdylib", "rlib"] [dependencies] axum = { version = "0.7.5", optional = true } console_error_panic_hook = "0.1" -leptos = { git = "https://github.com/leptos-rs/leptos", rev = "20af4928b2fffe017408d3f4e7330db22cf68277" } -leptos_axum = { git = "https://github.com/leptos-rs/leptos", rev = "20af4928b2fffe017408d3f4e7330db22cf68277", optional = true } -leptos_meta = { git = "https://github.com/leptos-rs/leptos", rev = "20af4928b2fffe017408d3f4e7330db22cf68277" } -leptos_router = { git = "https://github.com/leptos-rs/leptos", rev = "20af4928b2fffe017408d3f4e7330db22cf68277" } +leptos = { version = "0.7.0-beta2" } +leptos_axum = { version = "0.7.0-beta2", optional = true } +leptos_meta = { version = "0.7.0-beta2" } +leptos_router = { version = "0.7.0-beta2" } tokio = { version = "1", features = ["rt-multi-thread"], optional = true } tower = { version = "0.5.0", optional = true } tower-http = { version = "0.5", features = ["fs"], optional = true }