diff --git a/ssr/Cargo.toml b/ssr/Cargo.toml index 643eaf8c..9abbb6d4 100644 --- a/ssr/Cargo.toml +++ b/ssr/Cargo.toml @@ -55,7 +55,7 @@ icondata_core = "0.1.0" serde_json = "1.0" crc32fast = "1.4.0" uts2ts = "0.4.1" -rand_chacha = { version = "0.3.1" } +rand_chacha = { version = "0.3.1", optional = true } web-sys = { version = "0.3", features = [ "Clipboard", "Navigator", @@ -132,6 +132,7 @@ hydrate = [ "ic-agent/wasm-bindgen", "dep:web-sys", "reqwest/native-tls", + "dep:rand_chacha", "tonic/codegen", "speedate", ] diff --git a/ssr/src/page/root.rs b/ssr/src/page/root.rs index d6cba03f..f73af68f 100644 --- a/ssr/src/page/root.rs +++ b/ssr/src/page/root.rs @@ -1,6 +1,11 @@ use candid::Principal; use leptos::*; use leptos_router::*; +use rand_chacha::{ + rand_core::{RngCore, SeedableRng}, + ChaCha8Rng, +}; +use yral_canisters_common::utils::time::current_epoch; use crate::{ component::spinner::FullScreenSpinner,