diff options
Diffstat (limited to 'webapp/src/components/table.rs')
-rw-r--r-- | webapp/src/components/table.rs | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/webapp/src/components/table.rs b/webapp/src/components/table.rs index a285449..7c0b3a3 100644 --- a/webapp/src/components/table.rs +++ b/webapp/src/components/table.rs @@ -1,10 +1,10 @@ -use crate::components::{Hand, BiddingTable, BiddingBox}; +use crate::components::{BiddingBox, BiddingTable, Hand}; use crate::use_app_context; use crate::utils::ok_json; use anyhow::Context; use gloo_net::http::Request; use log::info; -use protocol::bridge_engine::GameStatePlayerView; +use protocol::bridge_engine::{GameStatePlayerView, BiddingState, BiddingStatePlayerView}; use yew::prelude::*; #[function_component(OnlineTable)] @@ -72,24 +72,16 @@ pub fn table(props: &TableProps) -> Html { }) }; let center = match &props.table { - GameStatePlayerView::Bidding { - bidding, - .. - } => html! { + GameStatePlayerView::Bidding(BiddingStatePlayerView { bidding, .. }) => html! { <> <BiddingTable bidding={bidding.clone()} /> <BiddingBox current_bid={bidding.highest_bid().clone()} { on_bid } /> + { format!("It is {:?} to bid", bidding.current_bidder()) } </> }, - GameStatePlayerView::PassedOut { - .. - } => todo!(), - GameStatePlayerView::Lead { - .. - } => todo!(), - GameStatePlayerView::Play { - .. - } => todo!(), + GameStatePlayerView::PassedOut { .. } => todo!(), + GameStatePlayerView::Lead { .. } => todo!(), + GameStatePlayerView::Play { .. } => todo!(), }; html! { <> |