summaryrefslogtreecommitdiff
path: root/webapp/src/components/show_bid.rs
blob: a292b5c90d855dfe583f1e1d5ae707d30f9a991d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use protocol::{bridge_engine::Bidding, contract::Contract};
use yew::prelude::*;

#[derive(PartialEq, Properties, Clone)]
pub struct ShowBidProps {
    pub contract: Option<Contract>,
    pub bidding: Bidding,
}

#[function_component(ShowBid)]
pub fn show_bid(props: &ShowBidProps) -> Html {
    html! {
        <>
            <p>{
                match props.contract {
                    None => "Passed".to_string(),
                    Some(c) => format!("{}", c),
                }
            }</p>
        </>
    }
}