mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-01-23 00:59:22 -05:00
parent
08b7d7e932
commit
1a189cf7a4
4 changed files with 16 additions and 6 deletions
|
@ -3,6 +3,12 @@
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.13.3] - 2024-09-02
|
||||||
|
|
||||||
|
### Fix 🍕
|
||||||
|
|
||||||
|
- Fixed `use_color_mode` with cookies enabled
|
||||||
|
|
||||||
## [0.13.2] - 2024-09-02
|
## [0.13.2] - 2024-09-02
|
||||||
|
|
||||||
### Fix 🍕
|
### Fix 🍕
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "leptos-use"
|
name = "leptos-use"
|
||||||
version = "0.13.2"
|
version = "0.13.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Marc-Stefan Cassola"]
|
authors = ["Marc-Stefan Cassola"]
|
||||||
categories = ["gui", "web-programming"]
|
categories = ["gui", "web-programming"]
|
||||||
|
|
|
@ -8,7 +8,7 @@ crate-type = ["cdylib", "rlib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum = { version = "0.7", optional = true }
|
axum = { version = "0.7", optional = true }
|
||||||
codee.workspace = true
|
codee = "0.2"
|
||||||
console_error_panic_hook = "0.1"
|
console_error_panic_hook = "0.1"
|
||||||
console_log = "1"
|
console_log = "1"
|
||||||
cfg-if = "1"
|
cfg-if = "1"
|
||||||
|
|
|
@ -215,11 +215,15 @@ where
|
||||||
let _ = sync_signal_with_options(
|
let _ = sync_signal_with_options(
|
||||||
(cookie, set_cookie),
|
(cookie, set_cookie),
|
||||||
(store, set_store),
|
(store, set_store),
|
||||||
SyncSignalOptions::with_transforms(
|
SyncSignalOptions::with_assigns(
|
||||||
move |cookie: &Option<ColorMode>| {
|
move |store: &mut ColorMode, cookie: &Option<ColorMode>| {
|
||||||
cookie.clone().unwrap_or_else(|| store.get_untracked())
|
if let Some(cookie) = cookie {
|
||||||
|
*store = cookie.clone();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
move |cookie: &mut Option<ColorMode>, store: &ColorMode| {
|
||||||
|
*cookie = Some(store.clone())
|
||||||
},
|
},
|
||||||
move |store: &ColorMode| Some(store.clone()),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue