summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-12-23 08:41:35 -0500
committerKjetil Orbekk <kj@orbekk.com>2022-12-23 08:41:35 -0500
commit6cba6e782c08350defefce14f65f5b19ce2b1023 (patch)
treea3c9c2d71ab65021c8b0d8a3b0a7382f336cf409
parent997b81ca1f6926d628e41c405ef219e81000e1df (diff)
Display current trick with the TrickInPlay component
-rw-r--r--webapp/src/components/table.rs5
-rw-r--r--webapp/src/components/trick_in_play.rs1
2 files changed, 3 insertions, 3 deletions
diff --git a/webapp/src/components/table.rs b/webapp/src/components/table.rs
index ab95e10..92d862c 100644
--- a/webapp/src/components/table.rs
+++ b/webapp/src/components/table.rs
@@ -1,7 +1,7 @@
use std::future::Future;
use std::pin::Pin;
-use crate::components::{BiddingBox, BiddingTable, Hand};
+use crate::components::{BiddingBox, BiddingTable, Hand, TrickInPlay};
use crate::use_app_context;
use crate::utils::ok_json;
use anyhow::Context;
@@ -145,8 +145,7 @@ pub fn playing_view(
html! {
<>
<div class="center">
- <p>{format!("It is {:?} to play", playing.current_player())}</p>
- <p>{format!("Current trick: {:?}", playing.current_trick)}</p>
+ <TrickInPlay in_progress={playing.current_trick.clone()}/>
</div>
<div class="hand north">
{ dummy }
diff --git a/webapp/src/components/trick_in_play.rs b/webapp/src/components/trick_in_play.rs
index c68239e..5400b49 100644
--- a/webapp/src/components/trick_in_play.rs
+++ b/webapp/src/components/trick_in_play.rs
@@ -12,6 +12,7 @@ pub fn trick_in_play(props: &TrickInPlayProps) -> Html {
html! {
<>
<p>{ format!("Leader: {:?}", props.in_progress.leader()) }</p>
+ <p>{ format!("It is {:?} to play", props.in_progress.current_player()) }</p>
{ for cards }
</>
}