fix(web): leptos-use broke stuff with use_cookie

This commit is contained in:
əlemi 2024-09-19 17:05:53 +02:00
parent 174ef4198d
commit 349bcb1e4f
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 8 additions and 3 deletions

View file

@ -26,7 +26,8 @@ serde-inline-default = "0.2"
dashmap = "6.1"
leptos = { version = "0.6", features = ["csr", "tracing"] }
leptos_router = { version = "0.6", features = ["csr"] }
leptos-use = { version = "0.10", features = ["serde"] }
leptos-use = "0.13"
codee = { version = "0.2", features = ["serde_json"] }
reqwest = { version = "0.12", features = ["json"] }
apb = { path = "../apb", features = ["unstructured", "activitypub-fe", "activitypub-counters", "litepub", "did-core"] }
uriproxy = { path = "../utils/uriproxy/" }

View file

@ -4,7 +4,11 @@ use leptos_router::*;
use crate::prelude::*;
use crate::CONTACT;
use leptos_use::{signal_debounced, storage::use_local_storage, use_cookie_with_options, use_element_size, use_window_scroll, UseCookieOptions, utils::{FromToStringCodec, JsonCodec}, UseElementSizeReturn};
use codee::string::{FromToStringCodec, JsonSerdeCodec};
use leptos_use::{
signal_debounced, storage::use_local_storage, use_cookie_with_options, use_element_size, use_window_scroll,
UseCookieOptions, UseElementSizeReturn
};
#[derive(Clone, Copy)]
pub struct Feeds {
@ -59,7 +63,7 @@ pub fn App() -> impl IntoView {
// .secure(true)
.path("/")
);
let (config, set_config, _) = use_local_storage::<crate::Config, JsonCodec>("config");
let (config, set_config, _) = use_local_storage::<crate::Config, JsonSerdeCodec>("config");
let auth = Auth { token, userid };