summaryrefslogtreecommitdiff
path: root/webapp/src/components/show_bid.rs
blob: 81cc7aa66b0e59e06cf69532c6f4b9daf102bee6 (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};
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>
        </>
    }
}