summaryrefslogtreecommitdiff
path: root/webapp/src/components/show_bid.rs
blob: 59147108315b2ca4bcebed9dbcfda126eacbacb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::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>
        </>
    }
}