diff --git a/ssr/src/page/post_view/bet.rs b/ssr/src/page/post_view/bet.rs
index 7ee66f14..f56087f9 100644
--- a/ssr/src/page/post_view/bet.rs
+++ b/ssr/src/page/post_view/bet.rs
@@ -1,9 +1,3 @@
-use candid::Principal;
-use leptos::*;
-use leptos_icons::*;
-use leptos_use::use_interval_fn;
-use web_time::Duration;
-
use crate::{
canister::individual_user_template::{BettingStatus, PlaceBetArg, Result2},
component::{
@@ -20,6 +14,11 @@ use crate::{
MockPartialEq,
},
};
+use candid::Principal;
+use leptos::*;
+use leptos_icons::*;
+use leptos_use::use_interval_fn;
+use web_time::Duration;
#[derive(Clone, Copy, Debug, PartialEq)]
enum CoinState {
@@ -122,13 +121,13 @@ fn HNButton(
view! {
}
@@ -176,54 +175,81 @@ fn HNButtonOverlay(
can_place_bet.set(false)
}
});
+ let log_coin = { move || logging::log!("coin get: {:?}", coin.get()) };
+ log_coin(); // This ensures you're tracking `coin.get()` inside a reactive closure.
+ let tracked_coin1 =
+ { move || logging::log!("coin tracked: {:?}", coin.with_untracked(|v| *v)) };
+ tracked_coin1();
+ let tracked_coin = move || coin.with_untracked(|v| u64::from(*v));
view! {
-
Hot
-Hot
+Not
++ You staked {tracked_coin()} tokens on + {if let Some(bet_kind) = bet_direction() { + if bet_kind == BetKind::Hot { + "Hot" + } else { + "Not" + } + } else { + "?" + }}. Result is still pending +
+Not